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

Transport of additional variable

Register Blogs Community New Posts Updated Threads Search

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

I´m 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 I´m trying to model.

The definition of this kinematic diffusivity in CFX results in an error. Therefore I´d 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, 19:47
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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 online now   Reply With Quote

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

Quote:
Can you describe what you are doing?
Sure, I´m 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, I´m having some trouble accessing the value from the previous iteration. In this forum I found a similar question that remains unanswered ( http://www.cfd-online.com/Forums/cfx...iteration.html ). In the CFX reference guide the cel function citern is mentioned but I don´t know how to link it to the access of my variable.
bearli is offline   Reply With Quote

Old   July 2, 2010, 08:38
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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 online now   Reply With Quote

Old   July 7, 2010, 13:10
Default
  #5
New Member
 
Join Date: Jul 2010
Posts: 4
Rep Power: 16
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


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 Off
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 13: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 18:47.