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

Diffusivity coefficient dependent on the additional variable

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By Gert-Jan
  • 1 Post By ghorrocks
  • 2 Post By Opaque

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2018, 13:29
Default Diffusivity coefficient dependent on the additional variable
  #1
New Member
 
831726
Join Date: Feb 2018
Posts: 4
Rep Power: 8
831726 is on a distinguished road
Hi all,

I'm trying to model transport of an additional variable in a fluid domain within CFX. The diffusivity coefficient depends on the additional variable itself.

The following equations may help to understand the problem:

The transport equation for Ht (labelled as H):
111111.jpg

The diffusion coefficient:
111112.jpg

where the Ht is the local concentration. Thus it depends on itself.

As far as I have looked, I cannot seem to find a way around to implement this. I have tried adding the additional variable (H) in the equation in CEL expression however it comes with error in the solver.

Does anyone know how to overcome this in CFX Pre? If not is it possible to do in Fortran? I have no experience in using Fortran so any suggestions/ advice/ guide to approach it would be much appreciated! Have been stuck on this for couple of months and little bit frustrated

Many thanks!
Saj
831726 is offline   Reply With Quote

Old   March 22, 2018, 16:21
Default
  #2
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,835
Rep Power: 27
Gert-Jan will become famous soon enough
Not that I have a direct solution, but maybe we can mail it down. Questions I have:
- what error do you get?
- when do you get this error?
- in your equation you have a symbol epsilon. What's this? Is it the Eddy Dissipation rate?
- Are you sure you get realistic values for the diffusion coefficients all the time? Meaning, do you always get positive values?
- Or in other words: how does your CEL-equation exactly look like? Did you use min/max limiters?

Regs, Gert-Jan
831726 likes this.
Gert-Jan is offline   Reply With Quote

Old   March 22, 2018, 16:24
Default
  #3
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,727
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Does CFX-Pre allow you to do this? Or does the solver crash with a numerical error?

How big a range do you expect the diffusivity to vary over in your simulation?

I suspect the numerical system you are proposing is significantly different to the normal equations and so you are probably going to have to do some numerical stuff to get this to converge - and that is if it is solvable at all, that is not guaranteed.

You will certainly need to use the normal tricks to get tricky simulations to converge - so small time steps, double precision, good quality mesh, good initial condition. But this might need to put some underrelaxation on that equation and possibly other things. You can do underrelaxation in the GUI but if that is not enough you might need fortran to impose more sophisticated techniques.
831726 likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   March 23, 2018, 04:33
Default
  #4
New Member
 
831726
Join Date: Feb 2018
Posts: 4
Rep Power: 8
831726 is on a distinguished road
Thanks for your reply. Hope the following answers your questions:

CEL expression is written as:

DiffusionCoefficient = ESDiffusion*(1-3.77* epsilon* Ht+3.7* Ht^2* epsilon^2)
ESDiffusion = (boltzmann * 1 [K]) / (6*pi*0.0012 [kg m^-1 s^-1]* 3.5e-6 [m])
epsilon = (SRate^2)*0.1931611631 [s^2]

where Ht is a additional variable

Diffusion constant is expected to be all positive values since Ht is a volume fraction. If Ht equals to 0, value would still be positive since 'ESDiffusion' is a constant positive value.

Error in the solver states:

'Error processing expression 'Kinematic Diffusivity'.
The expression is invalid because:
HAEMATOCRIT is not available for use in this term
Error processing expression: Kinematic Diffusivity = DiffusionCoefficient'
831726 is offline   Reply With Quote

Old   March 23, 2018, 04:45
Default
  #5
New Member
 
831726
Join Date: Feb 2018
Posts: 4
Rep Power: 8
831726 is on a distinguished road
Thanks for your reply.

Currently the solver crash on CFX Command Language for the Run therefore it doesn't converge. I understand this is due to the incorrect input in CEL expression as in CFX doesn't allow additional variable to be expressed in the equation where the diffusion coefficient of the additional variable is calculated from. In the post above I have written down the expression and the error stated.

I was also wondering if there is a way to define the local concentration/ Volume fraction per cell in CEL expression.
831726 is offline   Reply With Quote

Old   March 23, 2018, 06:13
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,727
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The solver stops you from doing this because it cannot handle it. You are changing the fundamental equations so the solver may not be a valid approach any more.

How big a range do you expect the diffusivity to vary over in your simulation?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   March 23, 2018, 08:26
Default
  #7
Senior Member
 
Join Date: Jun 2009
Posts: 1,815
Rep Power: 32
Opaque will become famous soon enough
OK.. It is always best to start with the original error.

You are getting a validation error indicating the expression for Kinematic Diffusivity does not support the use of Additional Variables in the expressions.

Nothing so far about the equation you are trying to solve.

If you want to bypass the validation error, you can try (at your own risk), adding the following section of CFX Command Language

RULES:
PARAMETER: Kinematic Diffusivity
Dependency List = ANY
END
END

The above has been suggested in the forum to bypass similar hardcoded limitations. However, once you bypass you could encounter other errors downstream. For example, as others have suggested, numerical instabilities; therefore, be prepared to reduce your timestep, relaxation, etc.

Good luck
Gert-Jan and 831726 like this.
Opaque is offline   Reply With Quote

Old   March 23, 2018, 08:43
Default
  #8
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,835
Rep Power: 27
Gert-Jan will become famous soon enough
Given this workaround, I would add that you definitely need to min/max your equation to obtain reasonable values. Epsilon can vary from very small to very high values, especially at the start of the iteration process or at bad elements. These can easily lead to unrealistic diffusivities, leading to divergences or fpx-errors.

Good luck, Gert-Jan
Gert-Jan is offline   Reply With Quote

Old   March 27, 2018, 17:28
Default
  #9
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,171
Rep Power: 23
evcelica is on a distinguished road
Have you check the turbulent diffusion contribution compared to molecular? Usually this is >> molecular diffusion, so whatever you put in for molecular will not really matter much, unless you have a special case.

If it does matter, and you are running steady state solution. you could obtain your initial solution with a constant kinematic diffusivity, then make that diffusivity a function of position(x,y,z) based on your initial results, Iterate.
evcelica is offline   Reply With Quote

Old   June 25, 2018, 07:25
Default Problem solved
  #10
New Member
 
831726
Join Date: Feb 2018
Posts: 4
Rep Power: 8
831726 is on a distinguished road
Using Opaque's suggestion problem was solved!
831726 is offline   Reply With Quote

Reply


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
Additional variable John CFX 2 October 16, 2008 05:33
Additional Variable Transfer Coefficient Saturn CFX 0 August 17, 2006 01:48
Multi_component Vs Additional Variable Anurag CFX 2 February 4, 2005 16:45
Additional Variable + Multiphase Paresh Jain CFX 0 April 2, 2004 08:32
additional variable mass transfer in CFX5.6 john CFX 1 February 14, 2004 00:30


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