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

Nearest wall Distance

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 2, 2015, 04:40
Default Nearest wall Distance
  #1
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
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
miz_miz is offline   Reply With Quote

Old   March 2, 2015, 05:48
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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?
ghorrocks is offline   Reply With Quote

Old   March 2, 2015, 06:01
Default
  #3
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
Yes i'm using the SST turbulence model

no my approximation needs the nearest wall distance
miz_miz is offline   Reply With Quote

Old   March 2, 2015, 06:24
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   March 2, 2015, 06:31
Default
  #5
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
thank you i'll try to implement the normal gradient of concentration and if i have question i'll ask you
miz_miz is offline   Reply With Quote

Old   March 2, 2015, 06:43
Default
  #6
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
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.
miz_miz is offline   Reply With Quote

Old   March 2, 2015, 07:00
Default
  #7
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   March 2, 2015, 07:07
Default
  #8
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
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.
miz_miz is offline   Reply With Quote

Old   March 2, 2015, 07:24
Default
  #9
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
what if the geometry is the elbow which gradient i choose X/Y or Z ??
miz_miz is offline   Reply With Quote

Old   March 2, 2015, 07:45
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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?
ghorrocks is offline   Reply With Quote

Old   March 2, 2015, 09:39
Default
  #11
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
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,
Opaque is offline   Reply With Quote

Old   March 2, 2015, 11:10
Default
  #12
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
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)
miz_miz is offline   Reply With Quote

Old   March 2, 2015, 12:08
Default
  #13
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
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.
Opaque is offline   Reply With Quote

Old   March 2, 2015, 12:14
Default
  #14
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
it's a multiphase flow
miz_miz is offline   Reply With Quote

Old   March 2, 2015, 15:04
Default
  #15
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
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.
Opaque is offline   Reply With Quote

Old   March 2, 2015, 15:07
Default
  #16
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
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
miz_miz 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
[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


All times are GMT -4. The time now is 18:51.