Page 1 of 2

Variable boundary condition execution

Posted: 30 Sep 2020, 20:48
by armaghantelgerafchi
To whom it may concern
I have a problem with a variable boundary condition. In my modeling, the variable boundary condition of Heat Flux and Pressure didn't execute. I write the SIF file for your reference. I would be pleased if you kindly help me.

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 = Transient
Steady State Max Iterations = 10
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Timestep intervals = 5
Timestep Sizes = 1
Solver Input File = case.sif
Post File = case.vtu
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



Body 2

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



Body 3

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



Body 4

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



Body 5

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



Body 6

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



Body 7

Target Bodies(1) = 7
Name = "Body 7"
Equation = 2
Material = 3
Initial condition = 3
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 = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End



Solver 1

Equation = Navier-Stokes
Variable = Flow Solution[Velocity:3 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 = Direct
Linear System Direct Method = Umfpack
End



Equation 1

Name = "Equation 1"
Convection = Computed
Active Solvers(1) = 2
End



Equation 2

Name = "Equation 2"
Convection = Computed
Active Solvers(2) = 2 1
End



Material 1

Name = "Material 1"
Heat Conductivity = 10
Density = 8000
End



Material 2

Name = "Material 2"
Density = 1800
Viscosity = 0.0009
Heat Conductivity = 88
End



Material 3

Name = "Material 3"
Viscosity = 0.00088
Heat Conductivity = 85
Density = 0.01
End



Initial Condition 1

Name = "InitialCondition 1"
Temperature = Variable coordinate 3
Real MATC" 1073-3893.8*tx"
End



Initial Condition 2

Name = "InitialCondition 6"
Temperature = Variable coordinate 3
Real MATC" 1034-442.5*(tx-0.01)
End



Initial Condition 3

Name = "InitialCondition 8"
Temperature = 1023
End



Boundary Condition 1

Target Boundaries(1) = 8
Name = "BoundaryCondition 1"
Velocity 3 = 0
Temperature = 1073
Velocity 2 = 0
Velocity 1 = 0
End



Boundary Condition 2

Target Boundaries(11) = 15 22 24 26 27 28 33 34 35 36 37
Name = "BoundaryCondition 2"
Noslip wall BC = True
End



Boundary Condition 3

Target Boundaries(1) = 14
Name = "BoundaryCondition 3"
Temperature = 1023.001
External Pressure = Variable " Temperature"
Real MATC " exp(-7750/tx +12.79 - 1.41 * tx)*101300/760
Heat Flux = Variable " Velocity 3 "
Real MATC " -124700*24*0.01*tx "
End



Boundary Condition 4

Target Boundaries(1) = 38
Name = "BoundaryCondition 6"
Temperature = 1023
End

Re: Variable boundary condition execution

Posted: 01 Oct 2020, 00:30
by raback
Hi, Be more careful with the quatiotion marks. -Peter

Re: Variable boundary condition execution

Posted: 01 Oct 2020, 13:09
by armaghantelgerafchi
Dear Peter
I double checked the quotation marks and still I have a same problem. The variable boundary condition doesn't execute.
I write the corrected SIF file for your reference.

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 = Transient
Steady State Max Iterations = 10
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Timestep intervals = 5
Timestep Sizes = 1
Solver Input File = case.sif
Post File = case.vtu
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

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

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

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

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

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

Body 7
Target Bodies(1) = 7
Name = "Body 7"
Equation = 2
Material = 3
Initial condition = 3
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 = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End

Solver 1
Equation = Navier-Stokes
Variable = Flow Solution[Velocity:3 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 = Direct
Linear System Direct Method = Umfpack
End

Equation 1
Name = "Equation 1"
Convection = Computed
Active Solvers(1) = 2
End

Equation 2
Name = "Equation 2"
Convection = Computed
Active Solvers(2) = 2 1
End

Material 1
Name = "Material 1"
Heat Conductivity = 10
Density = 8000
End

Material 2
Name = "Material 2"
Density = 1800
Viscosity = 0.0009
Heat Conductivity = 88
End

Material 3
Name = "Material 3"
Viscosity = 0.00088
Heat Conductivity = 85
Density = 0.01
End

Initial Condition 1
Name = "InitialCondition 1"
Temperature = Variable coordinate 3
Real MATC" 1073-(3893.8 * (tx)) "
End

Initial Condition 2
Name = "InitialCondition 6"
Temperature = Variable coordinate 3
Real MATC" 1034-(442.5 * (tx-0.01)) "
End

Initial Condition 3
Name = "InitialCondition 8"
Temperature = 1023
End

Boundary Condition 1
Target Boundaries(1) = 8
Name = "BoundaryCondition 1"
Velocity 3 = 0
Temperature = 1073
Velocity 2 = 0
Velocity 1 = 0
End

Boundary Condition 2
Target Boundaries(11) = 15 22 24 26 27 28 33 34 35 36 37
Name = "BoundaryCondition 2"
Noslip wall BC = True
End

Boundary Condition 3
Target Boundaries(1) = 14
Name = "BoundaryCondition 3"
Temperature = 1023.001
External Pressure = Variable " Temperature"
Real MATC " exp (-7750/(tx)+12.79 - 1.41 * ( tx)) * ( 101300/760 ) "
Heat Flux = Variable " Velocity 3 "
Real MATC " -124700 * 24 * 0.01 * tx "
End

Boundary Condition 4
Target Boundaries(1) = 38
Name = "BoundaryCondition 6"
Temperature = 1023
End

Re: Variable boundary condition execution

Posted: 01 Oct 2020, 14:18
by raback
Hi

What exactly do you mean by "does not execute"? Do you get results with constant BCs? Do you get errors? What does the output say?

-Peter

Re: Variable boundary condition execution

Posted: 01 Oct 2020, 15:13
by armaghantelgerafchi
Dear Peter
The modeling run without any errors. But when I made changes in variable boundary conditions, the results in Paraview and convergence diagram were constant. I think that is because of the boundary condition didn't execute in modeling. for example, when I removed the variable boundary condition, I got the same results in ParaView and convergence. it seems that the calculation didn't count variable boundary conditions. I got the result by using constant BC. So, I think that this is because of the variable BC.
Thank you for your help
I am looking forward to hearing your opinion
Armaghan

Re: Variable boundary condition execution

Posted: 01 Oct 2020, 16:27
by raback
Hi

You have for heat solver both Neumann and Dirichlet condition. You can't have both. The Dirichlet condition always prevails and for you its constant.

-Peter

Re: Variable boundary condition execution

Posted: 01 Oct 2020, 19:37
by armaghantelgerafchi
Hi Peter
Thank you for your response, How can I change it to the variable? I am new in Elmer and I don't know How can I fix it.
I appreciate the time that you spend on my modeling
sincerely,
Armaghan

Re: Variable boundary condition execution

Posted: 02 Oct 2020, 12:17
by armaghantelgerafchi
Dear Peter
I would be pleased if you give me some advice about how to change the Dirichlet boundary condition from constant to a variable?
I have two variable boundary conditions the first one is heat flux that is variable of velocity 3 and the second one is pressure 3 that is available of temperature. I read the Elmer manual but I couldn't find a way to change the Dirichlet boundary condition to a variable one.
Thank you for your help
I am looking forward to hearing your opinion
Armaghan

Re: Variable boundary condition execution

Posted: 02 Oct 2020, 12:57
by raback
Hi

Almost any keyword that is Real valued may be constant, table, MATC or F90 function. This applies to Temperature BCs as well.

-Peter

Re: Variable boundary condition execution

Posted: 02 Oct 2020, 16:30
by armaghantelgerafchi
What do you mean? Should I remove the temperature in the Dirichlet boundary condition? What should I do in Pressure boundary condition?