|
[Sponsors] |
February 24, 2015, 11:18 |
Distance of 1st Cell from the wall
|
#1 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
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, |
|
February 24, 2015, 17:51 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
Have a look at the Wall Distance variable. This variable is already calculated when you use the SST or related turbulence models.
|
|
February 25, 2015, 04:44 |
|
#3 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
I tried to use the Wall Distance Variable but it return me 0
then all my work doesn't run |
|
February 25, 2015, 05:22 |
|
#4 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
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 |
|
February 25, 2015, 06:25 |
|
#5 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
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. |
|
February 25, 2015, 07:02 |
|
#6 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
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 |
|
February 25, 2015, 07:22 |
|
#7 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
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. |
|
February 25, 2015, 07:41 |
|
#8 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
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 |
|
February 25, 2015, 10:23 |
|
#9 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
Is my source term expression correct ??
|
|
February 25, 2015, 18:16 |
|
#10 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
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.
|
|
February 25, 2015, 18:18 |
|
#11 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
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.
|
|
February 26, 2015, 04:24 |
|
#12 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
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 |
|
February 26, 2015, 05:14 |
|
#13 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
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. |
|
February 26, 2015, 06:36 |
|
#14 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
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 |
|
February 26, 2015, 06:52 |
|
#15 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
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?
|
|
February 26, 2015, 07:13 |
|
#16 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
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 |
|
February 26, 2015, 09:49 |
|
#17 |
New Member
miz
Join Date: Feb 2015
Posts: 23
Rep Power: 11 |
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 |
|
February 26, 2015, 18:07 |
|
#18 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,844
Rep Power: 144 |
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. |
|
|
|
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 |