|
[Sponsors] |
Introducing a scalar field for buoyancy production in k-epsilon |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 31, 2018, 13:26 |
|
#21 |
Senior Member
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11 |
Greeting!
During running a test case with my modified solver (pimpleFoam) and modified LRR turbulence model, I get an error :symbol lookup error:Undefined symbol ..... and it is referring to dimensioned Vector I just defined g (9.81) as a dimensionedVedtor in LRR.C and it compiled with no error. But it seems the solver is unfamiliar with that! I should say that the solver is working without problem with other cases. Exactly before calculation the R (Reynolds stress tensor) during the run, it jumps out. Inside the LRR.C I exactly before Reynolds stress eqns added that g (9.81) definition to use it as a vector in calculation of buoyancy term (Gb) to add that in to the Reynolds strees eqns. Regards Sina |
|
October 31, 2018, 16:01 |
|
#22 | |
Senior Member
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11 |
Quote:
The problem changed to another thing: no longer previous error! But I can't switch the wallReflection off now! The new modified LRR model is working properly, but it can't distinguish that the wallReflection is switched off! Is it coming from compilation procedure? |
||
April 19, 2019, 08:36 |
|
#23 | |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
Quote:
In epsilonsource/ksource: return -fvm::Susp(...) If it return -.... in code, G should be -G*... But in equation, it should be +G*... I am confused about it. Thank you. |
||
May 19, 2019, 18:11 |
|
#24 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
alpha is the phase fraction. So this is used for two phase flows.
g is a vector and it has a direction: https://github.com/OpenFOAM/OpenFOAM...Epsilon.C#L104 And it is used in scalar products. SuSp does add a source implizitly to an solver equation if it is positive, because this increases the stability of the solution. This means it is added to the diagonal of the matrix to be solved. If it is negative, it will be added explicitly, so to the "right" side of the equation. So it makes a difference, if you put something like -fvm::SuSp(-G, k) or +fvm::SuSp(G, k) to an equation, because it checks the sign of the first argument. |
|
May 19, 2019, 18:26 |
|
#25 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
In this case isn't alpha thermal diffusivity? See eg : https://github.com/OpenFOAM/OpenFOAM...lDiffusivity.H.
Caelan |
|
May 19, 2019, 19:48 |
|
#26 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
If you look for tutorial, where buoyantKEpsilon is used, you find them in:
tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D (dahl, tank3D) These are multiphase cases, where alpha is used. But to make sure, this is correct, I patched the buoyantKEpsilon/buoyantKEpsilon.C to output alpha dimension: Code:
alpha: [0 0 0 0 0 0 0] compare this to the dimensions of the thermal diffusivity: Code:
//- Thermal diffusivity for enthalpy of mixture for patch [kg/m/s] https://github.com/OpenFOAM/OpenFOAM...usivity.H#L116 Last edited by jherb; May 20, 2019 at 07:37. |
|
May 19, 2019, 21:35 |
|
#27 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
Good to know -- thanks for checking.
Caelan |
|
May 20, 2019, 09:45 |
|
#28 |
Senior Member
|
Hi,
I don't think that the alpha in compressibleTurbulenceModels is the phase fraction. alpha will be the phase fraction for the phaseCompressibleTurbulenceModels. https://github.com/OpenFOAM/OpenFOAM...ulenceModels.C However, for incompressible or compressible TurbulenceModels, alpha will be just a geometricOneField. https://github.com/OpenFOAM/OpenFOAM...moModels.C#L30 https://github.com/OpenFOAM/OpenFOAM...tricOneField.H Last edited by snak; May 21, 2019 at 09:08. |
|
May 21, 2019, 09:12 |
|
#29 |
Senior Member
|
In incompressibleTurbulenceModels, rhoField is also just a geometricOneField (uniform value of 1, without dimension).
When we use these models in multiphase-solver such as interFoam, density of fluid is not considered in the turbulenceModel. rho is 1 at everywhere. Sofisticated and elegant source-code of turbulence models makes the meanings of alpha and rho in turbulence models a little unclear, I think. We can get the both compressible and incompressible models from the same code in return for this. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Temperature calculation from total enthalpy in OpenFOAM (XiFOAM) | sharifi | OpenFOAM Running, Solving & CFD | 1 | October 8, 2020 10:16 |
Type mismatch: Assigning a scalar to a Field<Type> inside templated BC code | karlli | OpenFOAM Programming & Development | 2 | August 28, 2017 02:25 |
OpenFOAM floating point Error | upuli | OpenFOAM Programming & Development | 5 | June 20, 2016 04:19 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
SimpleFoam k and epsilon bounded | nedved | OpenFOAM Running, Solving & CFD | 1 | November 25, 2008 21:21 |