CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Distance of 1st Cell from the wall (https://www.cfd-online.com/Forums/cfx/149041-distance-1st-cell-wall.html)

miz_miz February 24, 2015 10:18

Distance of 1st Cell from the wall
 
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,

ghorrocks February 24, 2015 16:51

Have a look at the Wall Distance variable. This variable is already calculated when you use the SST or related turbulence models.

miz_miz February 25, 2015 03:44

I tried to use the Wall Distance Variable but it return me 0
then all my work doesn't run

miz_miz February 25, 2015 04:22

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

ghorrocks February 25, 2015 05:25

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.

miz_miz February 25, 2015 06:02

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 ??

ghorrocks February 25, 2015 06:22

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.

miz_miz February 25, 2015 06:41

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 February 25, 2015 09:23

Is my source term expression correct ??

ghorrocks February 25, 2015 17:16

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 February 25, 2015 17:18

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.

miz_miz February 26, 2015 03:24

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

ghorrocks February 26, 2015 04:14

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.

miz_miz February 26, 2015 05:36

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

ghorrocks February 26, 2015 05:52

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?

miz_miz February 26, 2015 06:13

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 February 26, 2015 08:49

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

ghorrocks February 26, 2015 17:07

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.


All times are GMT -4. The time now is 19:30.