CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Set boundary value of 1 field equal to another field (https://www.cfd-online.com/Forums/openfoam/179319-set-boundary-value-1-field-equal-another-field.html)

Saideep October 27, 2016 14:45

Set boundary value of 1 field equal to another field
 
Hi guys;

I am using modified interFOAM solver(Foam-extend 1.6) where I split total pressure(p) into two parts: pd(dynamic pressure) and pc(capillary pressure).

So, p = pd + pc.

I calculate pc from the surface tension force term equation (surface tension*interface curvature*dirac).
Later I compute p from the NSE (in pEqn.H).

As I am solving for both the variables I need boundary conditions for both variables pd and pc with ideal case being a zeroGradient for pc (specifying a pcRefCell and pcRefValue) and pd = -pc in order to obtain a fixed value for the total pressure (I would like to have p = 0 at inlet and outlet face boundaries).

Can anyone direct me how can I set "pd = -pc" at the inlet and outlet faces in the 0 file?

Thanks.

Antimony October 28, 2016 01:34

Hi,

Have you looked at groovyBC? That allows you to set your BC to a custom condition/value.

Cheers,
Antimony

adhiraj October 31, 2016 08:39

Are you solving PDEs for p, pc and pd--all three of them?
Would that not be a problem?

Saideep October 31, 2016 09:58

Hi Adhiraj,

interFOAM as it is, is not a balanced force model. (that is the capillary pressure gradient and surface tension force do not balance each other leading to spurious currents).

So, the way poreFOAM (code from Imperial College by Raeini.et.al.) capillary pressure (pc) is computed as follows:
laplacian (pc) = divergence (surface tension force), from found value for pc we try to compute the flux and remove it from the flux due to surface tension. In ideal case it should be 0 but due to interpolations and all it isn't so we try to filter some spurious fluxes generated by a percentage value.

Similar to interFoam, we solve for the dynamic pressure (NSE in pEqn.H) and the total pressure is the sum of computed capillary pressure (pc) and dynamic pressure (pd).

Saideep


All times are GMT -4. The time now is 10:56.