|
[Sponsors] |
May 2, 2009, 15:31 |
spray source term in k-epsilon equations
|
#1 |
New Member
Yejun Gong
Join Date: Mar 2009
Posts: 21
Rep Power: 18 |
Hi OpenFOAMers
I am trying to add the spray source term to the k-epsilon equations? the difficulty is that src/turbulenceModels/RAS/compressible/RNGkEpsilon has no interface to spray, furthermore, spray needs the runTime and Mesh info while turbulenceModels has not. Thanks a lot Best Regards Yejun |
|
May 2, 2009, 15:38 |
You can get these two variable from U.
|
#2 |
Senior Member
|
Hi Yejun
You can get these two variables from U. const Time & runTime=U.time(); const fvMesh &mesh=U.mesh(); Junwei |
|
May 2, 2009, 15:57 |
|
#3 |
New Member
Yejun Gong
Join Date: Mar 2009
Posts: 21
Rep Power: 18 |
thanks Junwei,
but there are still missing some inputs. indeed, turbulence model only has rho, U, phi and thermo as inputs, but spray needs p, T, composition of fuel, gasProperties and environmentalProperties. but still thank you. your answer inspired me that I may need just change the inputs of turbulenceModels. Yejun |
|
May 2, 2009, 19:45 |
|
#4 |
Senior Member
|
Hi Yejun
The terms p, T, composition of fuel, gasProperties and environmentalProperties are not related to turbulence model. These terms can be defined outside the turbulence model. If you want to incorporate these terms into turbulence model without disturbing the interface, just defined several pointers in the turbulence model file, and set these pointers after constructing the turbulence model but before invoking the function "correct". Another possible way is defining a variable for the source term you want to add, calculating it outside the class. Just update the source term variables defined every time step before invoking the "correct" Regards, Junwei |
|
May 3, 2009, 11:18 |
|
#5 |
New Member
Yejun Gong
Join Date: Mar 2009
Posts: 21
Rep Power: 18 |
Hi Junwei,
thanks a lot. I got it. according to your suggestion, I just add one inputs spray& to the inputs of RNGkEpsilonModel. and looks like it's much better. However, I also need change RASModel when it calls the RNGkEpsilonModel. I am still considering whether do I need to make such a big change. maybe I need just make a new turbulenceModel module which always has spray source terms added. thanks again. Yejun |
|
May 3, 2009, 11:33 |
|
#6 |
Senior Member
|
Yes you have to change the whole framework if you changed the interface.
Junwei |
|
May 4, 2009, 02:13 |
|
#7 |
Senior Member
xinguang cui
Join Date: Mar 2009
Posts: 116
Rep Power: 17 |
I also think you only need to change the turbulence model. The turbulence model is given seprately with the spray, you don't need to change the source code.
|
|
May 4, 2009, 11:23 |
|
#8 |
New Member
Yejun Gong
Join Date: Mar 2009
Posts: 21
Rep Power: 18 |
thanks a lot. I have already rebuild the framework by add a new sprayRAS folder to the turbulence Models. and let sprayRAS and sprayRNGkEpsilon call each other. and the compilation has passed.
thanks again. Yejun |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
momentum source term | zwdi | FLUENT | 14 | June 27, 2017 15:40 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 01:24 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 13, 2000 23:03 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 11, 2000 03:43 |