CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Boundary (http://www.cfd-online.com/Forums/openfoam-programming-development/116466-boundary.html)

 ariaballack April 19, 2013 14:51

Boundary

Hi everybody,

I am writing a solver for concentration diffusion. Somehow I need to set a boundary condition for concentration so that instead of a fixedValue for a wall, the value at the wall could have a new value after each time step and the value is the average of for example concentration (concentration has already been solved in solver). what type of boundary type should i use and how?
thanks

 Lieven April 19, 2013 15:51

Hi Aria,

Is it the scalar transport (convection-diffusion) equation that you are solving? If so, I would advise you to pick a zeroGradient BC. This prevents any diffusion over the wall boundary from occurring.

Cheers,

L

 ariaballack April 20, 2013 10:03

Hi,
Yes, thats what i solve, but the particel at surface has to be renewed after each five second with a concentration equal to average one. Thats why i need a flexible BC.

 Lieven April 21, 2013 03:13

Hi Aria,

The boundary condition you want to impose is not really clear to me. Do you have a mathematical expression for it to clearify it?
E.g. the five seconds, is this equal to the preset time step?

Cheers,

L

 olivierG April 22, 2013 08:16

hello,

Take a look at groovyBC: you can use a mixed BC (zeroGradient/value), and switch with the expression value you want (like every 5 s), and calculate the average concentration you need.

NB: And like Lieven say, take care when you use fixedValue, since you have no control over the diffusive flux.

regards,
olivier

 All times are GMT -4. The time now is 23:43.