CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

spray source term in k-epsilon equations

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 2, 2009, 15:31
Default spray source term in k-epsilon equations
  #1
New Member
 
Yejun Gong
Join Date: Mar 2009
Posts: 20
Rep Power: 9
yejungong is on a distinguished road
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
yejungong is offline   Reply With Quote

Old   May 2, 2009, 15:38
Default You can get these two variable from U.
  #2
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Hi Yejun

You can get these two variables from U.
const Time & runTime=U.time();
const fvMesh &mesh=U.mesh();

Junwei
su_junwei is offline   Reply With Quote

Old   May 2, 2009, 15:57
Default
  #3
New Member
 
Yejun Gong
Join Date: Mar 2009
Posts: 20
Rep Power: 9
yejungong is on a distinguished road
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
yejungong is offline   Reply With Quote

Old   May 2, 2009, 19:45
Default
  #4
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
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
su_junwei is offline   Reply With Quote

Old   May 3, 2009, 11:18
Default
  #5
New Member
 
Yejun Gong
Join Date: Mar 2009
Posts: 20
Rep Power: 9
yejungong is on a distinguished road
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
yejungong is offline   Reply With Quote

Old   May 3, 2009, 11:33
Default
  #6
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Yes you have to change the whole framework if you changed the interface.

Junwei
su_junwei is offline   Reply With Quote

Old   May 4, 2009, 02:13
Default
  #7
Senior Member
 
xinguang cui
Join Date: Mar 2009
Posts: 116
Rep Power: 8
flying is on a distinguished road
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.
flying is offline   Reply With Quote

Old   May 4, 2009, 11:23
Default
  #8
New Member
 
Yejun Gong
Join Date: Mar 2009
Posts: 20
Rep Power: 9
yejungong is on a distinguished road
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
yejungong is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
momentum source term zwdi FLUENT 13 December 5, 2013 18:58
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


All times are GMT -4. The time now is 21:16.