No results for Heat Flux

Numerical methods and mathematical models of Elmer
Post Reply
Environmat
Posts: 12
Joined: 05 Mar 2012, 12:16
Antispam: Yes
Location: Basel, Switzerland

No results for Heat Flux

Post by Environmat »

Hey guys,

I'm trying to compute the Heat flux of a pipe with a increasing heating of the inner surface of the pipe. I want to display the values of the heat flux in paraview after that, but it doesn't show any results for the heat flux.
I'm using the method of the Elmer Models Manual of the Flux compute section. I think it is computing the heat flux correctly, but it doesn't show it.

Code: Select all

Simulation
  Max Output Level = 4
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Transient
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Timestep intervals = 50
  Timestep Sizes = 0.1
  Solver Input File = case.sif
  Post File = case.ep
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.67e-08
  Permittivity of Vacuum = 8.8542e-12
  Boltzmann Constant = 1.3807e-23
  Unit Charge = 1.602e-19
End

Body 1
  Target Bodies(1) = 1
  Name = "Body 1"
  Equation = 1
  Material = 1
  Initial condition = 1
End

Solver 1
  Equation = Heat Equation
  Variable = -dofs 1 Temperature
  Procedure = "HeatSolve" "HeatSolver"
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-8
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-8
  Linear System Preconditioning = ILU1
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1
End

Solver 2
	Exec Solver = after all
	Equation = "flux compute"
	Procedure = "FluxSolver" "FluxSolver"
	Calculate Flux = Logical True
	Calculate Flux Magnitude = Logical True
	Calculate Grad = Logical True
	Calculate Grad Magnitude = Logical True
	Flux Variable = String Temperature
	Flux Coefficient = String "Heat Conductivity"
	
	Linear System Solver = Iterative
  	Linear System Iterative Method = BiCGStab
  	Linear System Max Iterations = 500
  	Linear System Convergence Tolerance = 1.0e-8
  	Linear System Preconditioning = ILU1
  	Linear System ILUT Tolerance = 1.0e-3
  	Linear System Abort Not Converged = False
  	Linear System Residual Output = 1
  	Linear System Precondition Recompute = 1
End

Solver 3
  Exec Solver = String "after timestep"
  Equation = String "ResultOutput"
  Procedure = File "ResultOutputSolve" "ResultOutputSolver"
  Output File Name = String "case"
  Output Format = String "vtu"
End


Equation 1
  Name = "Heat"
  Active Solvers(3) = 1 2 3
End

Material 1
  Name = "Steel (stainless - generic)"
  Porosity Model = van Genuchten
  Poisson ratio = 0.285
  Heat expansion Coefficient = 14.9e-6
  Electric Conductivity = 1.824e6
  Youngs modulus = 200.0e9
  Heat Conductivity = 24.0
  Sound speed = 5100.0
  Heat Capacity = 460.0
  Mesh Poisson ratio = 0.285
  Density = 7925.0
  Poisson ratio = 0.285
  Youngs modulus = 200.0e9
End

Initial Condition 1
  Name = "zero"
  Temperature = 273
End

Boundary Condition 1
  Target Boundaries(1) = 2
  Name = "Heating"
  Save Scalars = Logical True
  Heat Flux BC = Logical True
 
  Heat Transfer Coefficient = 12
  Temperature = Variable Time;Real;0.0 300;4.0 425;
End
For the Solver Log I get for the Flux section:

Code: Select all

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Working on mesh: .
ResultOutputSolver: Dimension of mesh: 3
ResultOutputSolver: Saving in Unstructured VTK XML (.vtu) format
ResultOutputSolver: -------------------------------------
FluxSolver: -------------------------------------
FluxSolver: Computing the flux
FluxSolver: -------------------------------------
       1 0.6531E-04
       2 0.1534E-07
       3 0.4543E-11
       3 0.4543E-11
ComputeChange: NS (ITER=1) (NRM,RELC): (  135446.88      2.0000000     ) :: flux compute
       1 0.7201E-04
       2 0.1694E-07
       3 0.5270E-11
       3 0.5270E-11
ComputeChange: NS (ITER=2) (NRM,RELC): (  239205.31     0.55389207     ) :: flux compute
       1 0.8742E-04
       2 0.2161E-07
       3 0.7069E-11
       3 0.7069E-11
ComputeChange: NS (ITER=3) (NRM,RELC): (  179224.23     0.28669622     ) :: flux compute
       1 0.2249E-02
       2 0.5816E-06
       3 0.1953E-09
       3 0.1953E-09
ComputeChange: NS (ITER=4) (NRM,RELC): (  5643.6199      1.8778886     ) :: flux compute
       1 0.7201E-04
       2 0.1694E-07
       3 0.5270E-11
       3 0.5270E-11
ComputeChange: NS (ITER=5) (NRM,RELC): (  9966.8881     0.55389207     ) :: flux compute
       1 0.8742E-04
       2 0.2161E-07
       3 0.7069E-11
       3 0.7069E-11
ComputeChange: NS (ITER=6) (NRM,RELC): (  7467.6763     0.28669622     ) :: flux compute
       1 0.6191E-04
       2 0.1458E-07
       3 0.4891E-11
       3 0.4891E-11
ComputeChange: NS (ITER=7) (NRM,RELC): (  328198.16      1.9110106     ) :: flux compute
       1 0.1429E-02
       2 0.3370E-06
       3 0.1131E-09
       3 0.1131E-09
ComputeChange: NS (ITER=8) (NRM,RELC): (  13674.923      1.8400000     ) :: flux compute
FluxSolver:  Result Norm:    464515.18039203651
Can someone give me a hint what's wrong with it?
Thanks so far!
Cheers Mat
tzwinger
Site Admin
Posts: 100
Joined: 24 Aug 2009, 12:20
Antispam: Yes

Re: No results for Heat Flux

Post by tzwinger »

Hello Mat,

I guess the no-show of your flux might be connected to the fact that the VTU output is executed as "After Timestep" and the Flux computation as "After All" - make sure that the Flux is computed before the output.

What though puzzles me from your output is, that your FluxSolver seems to go into nonlinear iterations, which by your Solver Input File (SIF) it shouldn't (the default should be just one round). As a first try, I would put a

Code: Select all

Nonlinear Max Iterations = 1
into the solver section and see, whether this helps. As a starting point, you could also replace your SIF entry with the example given in the ModelsManual (and then add the further features, like Gradients, later):

Code: Select all

Solver 2
Exec Solver = after timestep ! and before the output solver !!!!!!
Equation = "flux compute"
Procedure = "FluxSolver" "FluxSolver"
Calculate Flux = Logical True
Flux Variable = String Temperature
Flux Coefficient = String "Heat Conductivity"
Linear System Solver = "Iterative"
Linear System Iterative Method = "cg"
Linear System Preconditioning = ILU0
Linear System Residual Output = 10
Linear System Max Iterations = Integer 500
Linear System Convergence Tolerance = 1.0e-10
End

Good luck,

Thomas
sillypants
Posts: 12
Joined: 06 Jan 2012, 23:02
Antispam: Yes

Re: No results for Heat Flux

Post by sillypants »

You can also change the ResultOutput to exec "after saving" so it writes the .vtu file every time it appends to the .ep. This way you are sure to get everything that would go into the ElmerPost file, and I believe you can be a bit more liberal with other solver exec flags.

-Toan
Environmat
Posts: 12
Joined: 05 Mar 2012, 12:16
Antispam: Yes
Location: Basel, Switzerland

Re: No results for Heat Flux

Post by Environmat »

Hey thanks for the quick help!
Now it seems to work! Thanks again!
Post Reply