help with curved pipe tutorial (2)

Numerical methods and mathematical models of Elmer
Post Reply
MatteoR
Posts: 3
Joined: 09 Jan 2018, 12:42
Antispam: Yes

help with curved pipe tutorial (2)

Post by MatteoR »

Hi everyone and thanks for this great software which I'm slowly starting to learn day by day.
I have a problem with the tutorial no.8 "Thermal flow in curved pipe" found in ElmerTutorials.pdf.
I follow precisely every given instruction, but in the end I get this result for the temperature distribution:
Wrong.jpg
(136.54 KiB) Not downloaded yet
..instead of this:
Correct.jpg
(169.04 KiB) Not downloaded yet
Can anyone help, what am I doing wrong?

The following is the SIF file I'm generating:
Thanks



Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End

Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Solver Input File = case.sif
Post File = case.vtk
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
End

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

Solver 2
Equation = Heat Equation
Procedure = "HeatSolve" "HeatSolver"
Variable = Temperature
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-7
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-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = Diagonal
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 1
Equation = Navier-Stokes
Procedure = "FlowSolve" "FlowSolver"
Variable = Flow Solution[Velocity:3 Pressure:1]
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-7
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-10
BiCGstabl polynomial degree = 2
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

Equation 1
Name = "Heat and Flow"
Convection = Computed
NS Convect = False
Active Solvers(2) = 2 1
End

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

Material 1
Name = "Water (room temperature)"
Viscosity = 1.002e-3
Heat expansion Coefficient = 0.207e-3
Heat Conductivity = 0.58
Relative Permittivity = 80.1
Sound speed = 1497.0
Heat Capacity = 4183.0
Density = 998.3
End

Material 2
Name = "Iron (generic)"
Heat expansion Coefficient = 11.8e-6
Heat Conductivity = 80.2
Sound speed = 5000.0
Heat Capacity = 449.0
Mesh Poisson ratio = 0.29
Density = 7870.0
Poisson ratio = 0.29
Youngs modulus = 193.053e9
End

Boundary Condition 1
Target Boundaries(1) = 1
Name = "HotInflow"
Velocity 3 = Variable Coordinate; Real MATC "100.0*(1.0e-4-tx(0)^2-tx(1)^2)"
Velocity 1 = 0
Velocity 2 = 0
Temperature = 350
End

Boundary Condition 2
Target Boundaries(1) = 3
Name = "Outflow"
Velocity 3 = 0.0
Velocity 2 = 0.0
Normal-Tangential Velocity = True
End

Boundary Condition 3
Target Boundaries(1) = 2
Name = "NoSlip"
Noslip wall BC = True
End

Boundary Condition 4
Target Boundaries(1) = 5
Name = "Troom"
Temperature = 300
End
MatteoR
Posts: 3
Joined: 09 Jan 2018, 12:42
Antispam: Yes

Re: help with curved pipe tutorial (2)

Post by MatteoR »

Ok, I found the solution myself.
I found an online working SIF file of the same Tutorial, here : http://www.nic.funet.fi/pub/sci/physics ... GUI.tar.gz
I manually compared the downloaded SIF with mine and found few differences:

Simulation
Max Output Level = 5 ---> (mine was 4)

Solver 1
Nonlinear System Convergence Tolerance = 1.0e-7 ---> (mine was 1.0e-8)
Linear System Convergence Tolerance = 1.0e-10 ---> (mine was 1.0e-8)


Now these two are not the cause of the problem I had. The cause was actually this:

Equation 1
Name = "Heat and Flow"
Convection = Computed
NS Convect = False --------> I had this line which was not present in the downloaded SIF file
Active Solvers(2) = 2 1
End

This line comes if you don't tick the "Options --> Convect" flag under the "Equatians --> Navier-Stokes" tab.
This is not stated clearly in the tutorial!
Here you can find more info about the above mentioned flag: viewtopic.php?f=4&t=423


Hope this can help others who are just beginning to learn this wonderful software.

Thanks,

Matteo
Post Reply