I am going to solve separate convection for melt and gas (using two set of Variables wit boundary conditions).
Thus there are two Navier Stokes solvers (Navier Stokes Melt and Navier Stokes Gas) actining in two different bodies.
In addition the thermal field should be solved in the entire domain, i.e. in all bodies.
Thus I define Temperature Convection Field = Flow Solution [velocity:3 pressure], where Flow Solution is now a unique field for all bodies.
In order to have the right advection term in the Heat Solver the Flow Solution variables should be set in the right manner.
How should the "Exported Variable" be defined as the are local for solver (only the bodies, where the solver will act).
For one solver the procedure of defining "Exported Variable" and Update works fine but how to do for two solvers acting in different
bodies ?
Wolfram
Exported Variables

 Site Admin
 Posts: 3277
 Joined: 22 Aug 2009, 11:57
 Antispam: Yes
 Location: Espoo, Finland
 Contact:
Re: Exported Variables
Hi Wolfram
I'm not totally positive that you can have two different instances of FlowSolver. Probably, but some lagacy solvers may have some limitations since our philosophy for multiphysics was not as settled then.
At least you need to have different values for Equation and Variable. Also if you have keywords that could be conflicting you might use namespace. e.g.
I don't see where "Exported Variable" here would be very helpful.
Also, I don't necessarily see why you need to have two instances for the same equation. Why can't you solve both at the same time? The natural reason would be different timescales. The one part having a stationary solution and the other a wildly transient one.
Peter
I'm not totally positive that you can have two different instances of FlowSolver. Probably, but some lagacy solvers may have some limitations since our philosophy for multiphysics was not as settled then.
At least you need to have different values for Equation and Variable. Also if you have keywords that could be conflicting you might use namespace. e.g.
Code: Select all
Solver 1
Equation = "FlowA"
Variable = FlowA[VeloA:3 PresA]
..
Solver 2
Equation = "FlowB"
Variable = FlowB[VeloB:3 PresB]
...
Boundary Condition 1
Name = Inflow
VeloA 1 = Variable "Coordinate 2"
Real MATC "tx(1tx)
...
Also, I don't necessarily see why you need to have two instances for the same equation. Why can't you solve both at the same time? The natural reason would be different timescales. The one part having a stationary solution and the other a wildly transient one.
Peter
Re: Exported Variables
Hi Peter
thank's for your reply.
Indeed, the way you describe it is exactly how I realize the two solvers.
Just, for the background. In Czochralski growth we have melt and gas flow. This want to separate as for gas flow it is not useful to include crystal and crucible rotation but for melt it is important. For this reason a use two different Flow solvers with two different boundary conditions. (At the melt/gas interface it is Marangoni flow for melt but nonslip for gas).
However, solving the heat equation in the entire furnace I want to solve one heat equation. Thus I need one velocity field containing melt velocity and gas velocity.
As the problem is axisymmetric the azimuthal velocity does not play any role and can be set to zero for the advection equation.
For melt convection I can define
where in the heat solver the advection term is set by
The velocities are set by a body force in the melt domain:
The question is how to do the same for the gas velocity.
Same kind of Body Force in the gas domain does not work because for the same export variable a segmentation error occur.
thank's for your reply.
Indeed, the way you describe it is exactly how I realize the two solvers.
Just, for the background. In Czochralski growth we have melt and gas flow. This want to separate as for gas flow it is not useful to include crystal and crucible rotation but for melt it is important. For this reason a use two different Flow solvers with two different boundary conditions. (At the melt/gas interface it is Marangoni flow for melt but nonslip for gas).
However, solving the heat equation in the entire furnace I want to solve one heat equation. Thus I need one velocity field containing melt velocity and gas velocity.
As the problem is axisymmetric the azimuthal velocity does not play any role and can be set to zero for the advection equation.
For melt convection I can define
Code: Select all
Solver 9
Equation = "NavierStokesMelt"
Procedure = "FlowSolve" "FlowSolver"
Stabilize = True
Variable = Flow Solution Melt [Velocitymelt:3 Pressuremelt:1]
!!! Update all exported variables
Update Exported Variables = Logical True
Exported Variable 1 = Flow Solution [Velocity:3 Pressure:1]
Exported Variable 2 = dofs 3 Velocityout
Code: Select all
Solver 3
Equation = Heat Equation
Procedure = "HeatSolve" "HeatSolver"
Variable = dofs 1 Temperature
Temperature Convection Field = Flow Solution [Velocity:3 Pressure:1]
Code: Select all
Velocity 1 = Variable Velocitymelt 1
Real MATC "tx"
Velocity 2 = Variable Velocitymelt 2
Real MATC "tx"
Velocity 3 = Real 0
Pressure = Variable Pressuremelt
Real MATC "tx"
The question is how to do the same for the gas velocity.
Same kind of Body Force in the gas domain does not work because for the same export variable a segmentation error occur.
Re: Exported Variables
Dear Peter and Wolfram,
did you manage to implement the solution below? I tried today and keep getting
Model Input: Unlisted keyword: [VeloA 1] in section: [boundary condition 1]
Thanks a lot
Adam
did you manage to implement the solution below? I tried today and keep getting
Model Input: Unlisted keyword: [VeloA 1] in section: [boundary condition 1]
Thanks a lot
Adam
raback wrote:Hi Wolfram
I'm not totally positive that you can have two different instances of FlowSolver. Probably, but some lagacy solvers may have some limitations since our philosophy for multiphysics was not as settled then.
At least you need to have different values for Equation and Variable. Also if you have keywords that could be conflicting you might use namespace. e.g.I don't see where "Exported Variable" here would be very helpful.Code: Select all
Solver 1 Equation = "FlowA" Variable = FlowA[VeloA:3 PresA] .. Solver 2 Equation = "FlowB" Variable = FlowB[VeloB:3 PresB] ... Boundary Condition 1 Name = Inflow VeloA 1 = Variable "Coordinate 2" Real MATC "tx(1tx) ...
Also, I don't necessarily see why you need to have two instances for the same equation. Why can't you solve both at the same time? The natural reason would be different timescales. The one part having a stationary solution and the other a wildly transient one.
Peter
Re: Exported Variables
Hi,
AFAIK the "unlisted keyword" message is just a warning stating that the keyword doesn't figure in the SOLVER.KEYWORDS file in the share/elmersolver/lib directory, meaning that you have to indicate the keyword type (e.g. "Real"). So if there is no error or misfunction you should not need to worry about that.
HTH,
Matthias
AFAIK the "unlisted keyword" message is just a warning stating that the keyword doesn't figure in the SOLVER.KEYWORDS file in the share/elmersolver/lib directory, meaning that you have to indicate the keyword type (e.g. "Real"). So if there is no error or misfunction you should not need to worry about that.
HTH,
Matthias
Re: Exported Variables
Thanks a lot, Matthias, you were absolutely right. The problem was that ElmerSolver manual tells me to write
while it should go
All the best
Adam
Code: Select all
Variable = Flow [VeloB:3 PresB]
Code: Select all
Variable = Flow Solution [VeloB:3 PresB]
Adam