CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

Transport of additional variable

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 1, 2010, 01:15
Post Transport of additional variable
  #1
New Member
 
Join Date: Jul 2010
Posts: 4
Rep Power: 7
bearli is on a distinguished road
Hi everyone,

Im trying to model the transport of an additional variable in a fluid (water) domain within CFX. The diffusivity of the corressponding transport equation is also dependent on the additional variable Im trying to model.

The definition of this kinematic diffusivity in CFX results in an error. Therefore Id like to know wheter it is possible to use this approach or if not, what other approach might be feasible?

Thanks in advance,
bearli
bearli is offline   Reply With Quote

Old   July 1, 2010, 18:47
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,823
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
If the diffusion coefficient is a function of the transport equation variable you are no longer using a standard additional variable transport equation. You will have to have a careful think about how to implement this numerically as it is tricky to get stable.

So by default I think CFX will reject this (as you have found), but you may be able to trick it by defining either a CEL function with the diffusivity or an additional variable with the diffusivity and using that as your diffusion coefficient. The aim here is to get the diffusivity to take the value from the previous iteration rather than being coupled.

If this does not work your only way forward is to do a user fortran routine to set the diffusivity.

Can you describe what you are doing?
ghorrocks is offline   Reply With Quote

Old   July 2, 2010, 07:25
Default
  #3
New Member
 
Join Date: Jul 2010
Posts: 4
Rep Power: 7
bearli is on a distinguished road
Thanks for the answer!

Quote:
Can you describe what you are doing?
Sure, Im trying to modell the transport of oxygen in a liquid. Inside the liquid there is a further oxygen source (S). Since the mass of the oxygen is comparably small I decided not to modell the oxygen content with a multicomponent mixture but with an additional variable (as partial pressure p_{o2}) that is treated in a further transport equation.

\bar{v}\nabla p_{o2}=D \nabla^2 p_{o2} + S
were D=f(p_{o2}) as well as S=f(p_{o2})

Quote:
but you may be able to trick it by defining either a CEL function with the diffusivity or an additional variable with the diffusivity and using that as your diffusion coefficient. The aim here is to get the diffusivity to take the value from the previous iteration rather than being coupled
As you suggested I will try to implement this approach first. However, Im having some trouble accessing the value from the previous iteration. In this forum I found a similar question that remains unanswered ( How to use values from previos iteration ). In the CFX reference guide the cel function citern is mentioned but I dont know how to link it to the access of my variable.
bearli is offline   Reply With Quote

Old   July 2, 2010, 07:38
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,823
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Quote:
...Since the mass of the oxygen is comparably small I decided not to modell the oxygen content with a multicomponent mixture...
Why not? That seems to be the best way to do this rather than having to specify non-constant constants in a transport equation.

There is no way in CEL to access variables from previous iterations or timesteps. My suggestion about using a CEL variable or a further additional variable is you may be able to trick CFX into giving you the value from the previous time step. From memory, CEL is evaluated at the start of an iteration before the equations are solved. The CEL is evaluated based on the values from the last iteration. So you may be able to use this to get the CEL to evaluate using the values from the last iteration and then solve the equations. You will have to fiddle with this to get it to work. You might need an additional CEL expression in there, you might need a callback function (eg probe, areaAve() etc) or you might need an additional variable.

As what you are trying to do is make use of an "undocumented feature" you will need to fiddle to get it to work - and no guarantees it will work at all in the end.
ghorrocks is offline   Reply With Quote

Old   July 7, 2010, 12:10
Default
  #5
New Member
 
Join Date: Jul 2010
Posts: 4
Rep Power: 7
bearli is on a distinguished road
Thanks for the answer. I had some tries but finally I decided to model my problem in FLUENT with UDS/UDF. Works fine!
bearli is offline   Reply With Quote

Reply

Tags
additional variable, kinematic diffusivity, old iteration, previous iteration

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
Transport equation for an Additional Variable HariBol CFX 2 November 26, 2007 17:07
Additional Variable - Diffusive Transport Equation RadheShyam Das CFX 3 October 18, 2007 12:35
Source terms for additional variable transport eqn Nandini Rohilla CFX 0 February 6, 2004 14:38
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 14:05.