|
[Sponsors] |
March 2, 2015, 04:40 |
Nearest wall Distance
|
#1 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
Hi everyone,
i want to create a CEL using the nearest wall distance, when i use the variable wall distance and run my CFX-Pre, it stopped because wall distance is equal to zero. if anyone has any solution so i can implement the nearest wall distance, can he just help me. Thanks |
|
March 2, 2015, 05:48 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Are you using the SST turbulence model?
From your other threads (http://www.cfd-online.com/Forums/cfx...cell-wall.html) it appears you want this distance so you can get the gradient of the concentration field at the wall. Is this correct? If so, then why not just get the gradient of the concentration field directly using the built in functions? |
|
March 2, 2015, 06:01 |
|
#3 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
Yes i'm using the SST turbulence model
no my approximation needs the nearest wall distance |
|
March 2, 2015, 06:24 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
The wall distance variable is calculated at the start of the fist iteration and, if transient at the start of all subsequent time steps where the mesh has moved. So it will not exist for the initial condition but should exist from then on (providing the SST or related turbulence model is used as it invokes the wall distance calculation).
Also I am not sure whether wall distance exists on the boundaries or in the volume nodes. I just had a quick look in the VARIABLES files and it seems to suggest it is a volume variable. If this is the case this makes it difficult as mapping boundary nodes to nearest volume nodes would be tricky to do. Your other post says that you are trying to implement J = (D/deltaY)*(Ci-Cwall) Where I presume deltaY is the wall distance and Ci-Cwall is the difference between the interior and wall concentrations. If this is the case, then isn't (Ci-Cwall)/deltaY the wall normal gradient of concentration, so you can rewrite your equation as J = D/WNG Where WNG is the wall normal gradient of concentration? Then you do not need the wall distance at all. |
|
March 2, 2015, 06:31 |
|
#5 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
thank you i'll try to implement the normal gradient of concentration and if i have question i'll ask you
|
|
March 2, 2015, 06:43 |
|
#6 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
when i use Conservative Volume Fraction.Gradient i get an error message which say :
Non-scalar variable 'oxygen.Conservative Volume Fraction.Gradient' referenced in parameter 'Flux' in object '/FLOW:Flow Analysis 1/DOMAINefault Domain/BOUNDARY:WallSource/BOUNDARY SOURCE/FLUIDxygen/SOURCES/EQUATION SOURCE:continuity'. Non-scalars are only allowed as arguments to integrated quantity functions. |
|
March 2, 2015, 07:00 |
|
#7 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Hang on there - you are using the volume fraction gradient to work out a concentration gradient! A volume fraction is not a concentration, do not get them confused.
You can specify which direction you want the gradient with gradient x/y/z. |
|
March 2, 2015, 07:07 |
|
#8 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
I asked Ansys help and they told me to have the concentration at each cell near the wall i should use the conservative volume fraction.
|
|
March 2, 2015, 07:24 |
|
#9 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
what if the geometry is the elbow which gradient i choose X/Y or Z ??
|
|
March 2, 2015, 07:45 |
|
#10 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
A multiphase flow is one which contains multiple phases. So oxygen bubbles in water is an example. And you model volume fractions and the phases move around with an interface drag model (so drag on the oxygen bubbles moves them about).
A multicomponent flow is one which contains a single fluid phase, but it is made up of multiple components. Examples include air (which is nitrogen gas, oxygen gas and small amounts of other gases) or oxygen dissolved in water (totally dissolved in the liquid that is, NOT as bubbles). Everything is in one phase. But the concentrations are measured as mass fractions and the mass fractions can move around with convection and diffusivity. So if the oxygen exists in bubbles then you have a multiphase flow. If the oxygen is dissolved in water then you have a multicomponent flow. If the oxygen is both bubbles and dissolved in water then you have both a multiphase and a multicomponent flow and things get complex. You need to get the basic model right before you do anything. Is your flow multiphase, multicomponent or both? |
|
March 2, 2015, 09:39 |
|
#11 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Just to add to Glenn's suggestions. The normal gradient at the boundary is by definition, grad(phi).normal. Using CEL, you can write it at
MyGraddotN = MyPhi.Gradient X * Normal X + MyPhi.Gradient Y * Normal Y + MyPhi.Gradient Z * Normal Z Such expression is valid for any boundary orientation. On the concentration variable. For multicomponent flow, CEL provides 3 variables for a given material component (or specie). For example, O2.Mass Fraction, O2.Mass Concentration, O2.Molar Concentration. But as Glenn's said, you should first clear what your are trying achieve (in my view your mathematical model), how to achieve it using CFX, a cclear understanding of what each variable means and their context, and then how to implement with the available tools. Best of luck, |
|
March 2, 2015, 11:10 |
|
#12 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
as i said, i have in my inlet water and bubbles of oxygen.
and i'm trying to add a source term at each cell which depends on the concentration at each cell and the near wall distance. i contacted the ANSYS-support and they told me to use the conservative volume fraction for my concentration at each cell. the question is to use the gradient of the conservative volume fraction or to use the distance near wall, but to have the distance near wall it depend on my SST modèle and i don't know how i can get that. So i tried the gradient method as told me Glenn, the only thing is my normal is radial so how can i get the gradient depending on this normal (because i'm modeling an elbow) |
|
March 2, 2015, 12:08 |
|
#13 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Not to be controversial, but you have not addressed Glenn's concerns: is it a multicomponent model you have ? multiphase ? or multicomponent+multiphase ? Without that information, it is very difficult for anyone in the forum to provide you with useful tips.
In addition, the definition of how to compute the normal gradient I provided is generic. Please take a closer look and you will see that barring any limitation in the software it should give you what you need. |
|
March 2, 2015, 12:14 |
|
#14 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
it's a multiphase flow
|
|
March 2, 2015, 15:04 |
|
#15 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
If I understood correctly, you have setup two fluid phases in ANSYS CFX, one for water as a pure substance, and one for O2 as another pure substance.
You are now trying to include a source term due to the gradient of O2 at the boundary, correct ? To which equation will you add such source term ? Once you decide what equation is the source term for, do you know the other state conditions for the source ? For example, velocity, turbulence, temperature , etc. For the sake of checking the source term would be applied correctly and that your setup is already in a good state, you can just make the source term a constant value and see if the solution makes any sense. Once you are in control of the model, you can make the source strength a function of the gradient or whatever else is meaningful to you. |
|
March 2, 2015, 15:07 |
|
#16 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
i add a source term the continuity
when i add a constant it works and it's correct ! my real problem is to put a function of the gradient |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Fluent3DMeshToFoam | simvun | OpenFOAM Meshing & Mesh Conversion | 50 | January 19, 2020 16:33 |
Dimensionless wall distance | messik | Main CFD Forum | 4 | March 15, 2014 07:55 |
Wall distance in BC | Sylvain | OpenFOAM | 1 | June 14, 2011 20:54 |
UDF problem about nearest wall ! | alex | FLUENT | 2 | December 24, 2010 22:31 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |