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

Distance of 1st Cell from the wall

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2015, 11:18
Default Distance of 1st Cell from the wall
  #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 an expression of the distance of the first cell from the wall (m)
how can i do this ?

Cheers,
miz_miz is offline   Reply With Quote

Old   February 24, 2015, 17:51
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
Have a look at the Wall Distance variable. This variable is already calculated when you use the SST or related turbulence models.
ghorrocks is offline   Reply With Quote

Old   February 25, 2015, 04:44
Default
  #3
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
I tried to use the Wall Distance Variable but it return me 0
then all my work doesn't run
miz_miz is offline   Reply With Quote

Old   February 25, 2015, 05:22
Default
  #4
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
i want in CFX-PRE to have the wall distance for the first cell from the wall at a location :
is this syntax right : minVall(Wall Distance)@Location
miz_miz is offline   Reply With Quote

Old   February 25, 2015, 06:25
Default
  #5
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 function is minVal. Look in the reference manual to make sure you get these things right.

Please post your CCL so we can see what you are trying to do.
ghorrocks is offline   Reply With Quote

Old   February 25, 2015, 07:02
Default
  #6
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
I have to add a source term at a wall which depend on a coefficient of diffusion, the wall distance at the first cell and the concentration.
it's a CEL :

The Flux = oxygen.Molar Mass*MolarFlux
with : MolarFlux = coeffDiff * 2 [mol m^-3] / NearWallDistance
NearWallDistance = minVal(oxygen.Wall Distance)@REGION:F10.8
REGION:F10.8 is mesh locators where i have to add my source term

is this correct ??

Last edited by miz_miz; February 25, 2015 at 07:15. Reason: precision
miz_miz is offline   Reply With Quote

Old   February 25, 2015, 07:22
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
This is a very strange function. Why is the molar flux a function of the smallest wall distance for your mesh on the surface? What physical process operates like this?

I don't think the variable is oxygen.Wall Distance. I think it is just Wall Distance.
ghorrocks is offline   Reply With Quote

Old   February 25, 2015, 07:41
Default
  #8
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
it's a multiphase flow so i have to add the oxygen. to Wall Distance
and this flux describes the corrosive molecular species such as the flux of oxygen
miz_miz is offline   Reply With Quote

Old   February 25, 2015, 10:23
Default
  #9
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
Is my source term expression correct ??
miz_miz is offline   Reply With Quote

Old   February 25, 2015, 18:16
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
You can apply any source term you like. But the function you describe does not take into account any physical factors like the concentration of oxygen in the fluid at the wall or anything about how fast the supply of oxygen is. You have defined a function which will just add a constant amount of oxygen forever. This does not sound very realistic to me.
ghorrocks is offline   Reply With Quote

Old   February 25, 2015, 18:18
Default
  #11
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
And another thing. If the oxygen is dissolved in the fluid (and I suspect it is as you mention a diffusion coefficient) then this is a multicomponent mixture simulation, not multiphase. This is only a multiphase simulation if the oxygen exists as bubbles - and then you will be defining bubble size and number, not molar fluxes.
ghorrocks is offline   Reply With Quote

Old   February 26, 2015, 04:24
Default
  #12
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
I defined a function which will add a constant of oxygen beacause i didn't know how to define the concentration of oxygen at first cell (if you have any idea about that)
it's a multiphase flow because water transportes bubbles of oxygen that stayed near the wall
miz_miz is offline   Reply With Quote

Old   February 26, 2015, 05:14
Default
  #13
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
So this is a multiphase and multicomponent flow? It sounds like you have oxygen bubbles (hence multiphase) and oxygen dissolved in the fluid (hence multicomponent mixture). This sounds like a complex model.

A worrying point: Your boundary condition was setting an oxygen flux, but your last post just mentioned setting the oxygen concentration. These are completely different things - make sure you understand what a flux is before going any further.

You can easily set the oxygen concentration to a fixed value at a wall, or a flux. Likewise you can set any internal volume to a fixed value or a flux using a source term.

I think you better describe what you are trying to do so we can help you select a valid approach.
ghorrocks is offline   Reply With Quote

Old   February 26, 2015, 06:36
Default
  #14
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
In my elbow inlet i put a multiphase flow with water, and bubbles of oxygen

and in the junction i'm trying to inject a source term. this source term is depending on a coefficient diffusion, the distance of the first cell and the concentration of oxygen near the wall.

my problems are :
i don't know how can i have the concentration of oxygen near wall and the distance of the first cell from the wall
miz_miz is offline   Reply With Quote

Old   February 26, 2015, 06:52
Default
  #15
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
Can you tell me what physics you are trying to model with the source term? Where is the oxygen coming from? What form is the added oxygen in - is it bubbles or is it dissolved in the water? Where is it going? What is the process by which it enters the water?
ghorrocks is offline   Reply With Quote

Old   February 26, 2015, 07:13
Default
  #16
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
i try to model corrosion in an elbow and to model the corrosion, i have to add a source term.

The coefficient of diffusion : is proposed by Hayduk and Minhas model (1982)
the distance from the first cell
and the difference between concentration at the cell near the wall and the wall concentration (in my study wall concentration is set to zero)

J = (D/deltaY)*(Ci-Cwall)

so water is at velocity 2m/s with a 0.9 volume fraction and oxygen is at velocity 0.1m/s with 0.1 volume fraction both enter from the main pipe(Inlet).

The water is a continuous fluid and oxygen is dispersed fluid with mean diameter of 6mm
and i also activate buoyancy (-9.81 following the Y-direction)

and i want to see the volume fraction at the junction of water and oxygen
miz_miz is offline   Reply With Quote

Old   February 26, 2015, 09:49
Default
  #17
New Member
 
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11
miz_miz is on a distinguished road
I want to add this source term at each first cell near the wall !
if you can help me, having the concentration and the wall distance at the first cell
miz_miz is offline   Reply With Quote

Old   February 26, 2015, 18:07
Default
  #18
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
Now I am really confused. You are now saying that oxygen is not dissolved in the water but exists as bubbles. So this is not a multicomponent flow. In this case there is no concentrations relevant, just volume fraction of oxygen. So there is no diffusivity to define.

I think it best if you attach an image of what you are modelling and your current CCL (even if it generates an error). There appear to be contradictory comments in your posts and we need to see what you are actually doing.
ghorrocks 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
Divergence in AMG solver! marina FLUENT 20 August 1, 2020 12:30
defining a CEL expression for nearest wall distance davidwilcox CFX 0 September 17, 2014 15:56
yPlusRAS utility - value for wall distance aylalisa OpenFOAM Post-Processing 1 September 1, 2014 01:15
Dimensionless wall distance messik Main CFD Forum 4 March 15, 2014 07:55
Wrong wall distance with cyclic boundaries sebastian OpenFOAM Bugs 4 October 31, 2012 11:24


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