I am doing my first steps with the Navier-Stokes solver, and I am having problems.
I want to simulate a flow of air going through a narrow tube which faces a wall. The case is set up with a 2D mesh and cylindric symmetry.
My case is attached. The problem is that the solver diverges and finishes with a crash. What am I doing wrong?
Elmer Version: 8.2 (Rev: Release, Compiled: 2016-03-15) Windoze 7 64-bit
Error message:
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 5
Coordinate System = Cylindric Symmetric
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 50
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Solver Input File = case.sif
Post File = case.vtu
Coordinate Scaling = 0.001
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) = 12
Name = "Innen"
Equation = 1
Material = 1
Initial condition = 1
End
Body 2
Target Bodies(1) = 14
Name = "Aussen"
Equation = 1
Material = 1
Initial condition = 1
End
Solver 1
Equation = Navier-Stokes
Variable = Flow Solution[Velocity:2 Pressure:1]
Procedure = "FlowSolve" "FlowSolver"
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
Equation 1
Name = "Equation 1"
Active Solvers(1) = 1
End
Material 1
Name = "Air (room temperature)"
Reference Temperature = 300
Viscosity = 1.983e-5
Heat expansion Coefficient = 3.43e-3
Compressibility Model = Perfect Gas
Reference Pressure = 1e5
Heat Conductivity = 0.0257
Relative Permittivity = 1.00059
Sound speed = 343.0
Heat Capacity = 1005.0
Density = 1.205
End
Initial Condition 1
Name = "Temperatur"
Temperature = 300
End
Boundary Condition 1
Target Boundaries(4) = 2 7 8 9
Name = "Noslip"
Noslip wall BC = True
End
Boundary Condition 2
Target Boundaries(1) = 3
Name = "Inlet"
Velocity 1 = 0.0
Velocity 2 = Variable Coordinate 1; Real MATC "2.07e8 *tx*tx-41.9175"
End
Boundary Condition 3
Target Boundaries(2) = 1 5
Name = "Axis"
Velocity 1 = 0.0
End
Changing the compressibility to incompressible doesn't really help.
I had a go with your case. It seems that your variable and the coordinate system are conflicting. The difference between "axi symmetric" and "cylindric symmetric" is that the latter includes the rotational component also i.e. it espects three velocity components and pressure. In your case rather use "axi symmetric".
This should be checked by the code since the conflict will result to problems. Unfortunately this is not currently done.
If you want to use the ideal gas law I think that Bubbles work better than stabilization. On the other hand if compressibility effects may be neglected you could also use incompressible flow.
Hi Peter,
- Thank you for highlighting the requirements of "cylindric symmetric" and "axi symmetric" coordinate system.
- When i ran the SIF with coordinate system = Axi symmetric , with the original Velocity 2 settings by Matthias, it underwent a prolonged iteration of N-s equations with log of Error::Itersolve: Failed convergence tolerances. In context of "cylindric symmetric", this error would be prompted quickly. How does the solve go differently in these two cases? Does the coordinates system affect so much in the iteration ease of the solve?
Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
The problem was that the Variable was explicitely given to have two velocity components whereas cylindrical symmetry assumes three. Therefore only parts of the local matrix were fulled up and there was zero rows in the matrix which means that it cannot have a solution. One could also solve the system as cylindric symmetric but there should be three velocity components and some BCs should be given for them too. However, the rotational velocity would be introduced only if there is rotation. The symmetry was originally coded to deal with crystal growth processes where the crystal rotates with respect to the fluid.
I didn't reply earlier since yesterday was a holiday in Germany...
Thank you for having a look at my case.
I reran it with Axi Symmetric and Bubbles instead of Stabilization. Unfortunately the solver still spits