Hello! I would like to unde
I would like to understand a few points about how
boundary conditions for vectorial fields are implemented in OpenFoam (OF).
I will be grateful for any help since "reverse engineering" from
source code is quite time consuming and may lead to terrible mistakes.
For background, my recent problem is related to boundary condition -
introduction of shear stress on free surface of incompressible closed
buoyant N-S flow. The shear stress comes from separate boundary element
based EM solver (very developed skin effect)+Marangoni forces. I already learned and tested implementation of boundary condition for scalar field (concentration segregation boundary condition on crystallization front was needed for diffusion problem which utilize velocity from mentioned above N-S problem) thus questions are only about vectorial field related differences.
The questions are
1. How conditions like "slip" condition is actually implemented in OF? My point
is - manuals says OF solves separate linear equation system - one per each vectorial component.
However, boundary condition in coordinate representation is system
of three equations which for arbitrary orientation of free surface has
appearance (mix) of all three components, Vx,Vy, Vz. Similar conditions
usually can be written by something like that
a_ij (V_j),n + b_ijV_j =C_i (1)
where a_ij and b_ij (i,j=1,2,3=x,y,z) are some kind of transformation
matrices and (V_j),n indicate a derivative in normal
direction of j-th component of vector V, finally C_j are constant quantities (may be 0).
Studies of source (+ OF discussion board) revealed that in order to set in OF
a boundary condition one has to specify
source terms and diagonal terms both for face gradients and face values.
Diagonal terms will be mix of a_ii and b_ii from (1). How about a_ij and b_ij in (1) with i!=j? Are these terms in OF belongs to the source term and the values comes from previous time step? How exact is boundary condition than?
2. From source code I got an impression that "symmetryPlane" and "slip" conditions are almost the
same. What kind of symmetry it exactly is - (local) translation symmetry or (local) mirroring symmetry?
I believe it must be mirroring. Lets have symmetry plane given by equation z=0. Then global
mirroring symmetry will be something similar to this
while local I believe is
V_z (x,y,0)=0 (3).
The Eq(3) ensures that V_n=V_z=0 on boundary while (V_z),z my have finite value.
Is Eq(3) implemented as symmetryPlane condition in OF or it's something
different? From code I got something like
(V_i),n-n_i n_j (V_j),n = 0 (4)
grad_n V = - (n_i n_j V_j )/d (5)
where n_i is i-th component of normal vector and d is something like distance from cell center till
face. It approx. gives (3) but I am confused by code in basicSymmetryFvPatchField.c
functions snGrad() and evaluate() where (5) exist in form which looks like
((I-2n_i n_j)V_j-V_i )/d with following division by 2. Why too complex expression for (5)? Am I correct that (4) and (5) is really that what is build in OpenFoam?
It seems that the matrix formation is in the file transformFvPatchField.C , however
I gave up on finding what really is "this->patch.weights()" and what kind of field is is
"*this" in valueBoundaryCoeffs(), so answer on question 1 is still very important for me...
Thanks a lot for any help, comments, corrections!
Dear OpenFOAM users I am lo
Dear OpenFOAM users
I am looking for help on specifying free-surface interface for a 3d geometry. The problem setup is following:
I have a shake-flask geometry. I am using interFoam to simulate the mixing of two fluids. Right now I am stuck with how to specify the height of the free surface. In CFX it could be done easily using the step function (ref. tutorial 7 of CFX). I am attaching the http://www.cfd-online.com/OpenFOAM_D...ges/1/4599.jpg for clarity.
Please help me.
Thanks in advance.
Hello Normunds I am extreme
I am extremely sorry for that i posted my doubt at the wrong place. I will be careful next time.
|All times are GMT -4. The time now is 14:23.|