
[Sponsors] 
April 26, 2007, 09:35 
Hello!
I would like to unde

#1 
New Member
Normunds Jekabsons
Join Date: Mar 2009
Location: Riga, Latvia
Posts: 10
Rep Power: 7 
Hello!
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 NS 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 NS 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 jth 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 V_x(x,y,z)=V_x(x,y,z); V_y(x,y,z)=V_y(x,y,z); V_z(x,y,z)=V_z(x,y,z) (2) while local I believe is (V_x),z (x,y,0)=0; (V_y),z (x,y,0)=0; 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),nn_i n_j (V_j),n = 0 (4) and grad_n V =  (n_i n_j V_j )/d (5) where n_i is ith 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 ((I2n_i n_j)V_jV_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! best regards /Normunds 

June 4, 2007, 06:38 
Dear OpenFOAM users
I am lo

#2 
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 8 
Dear OpenFOAM users
I am looking for help on specifying freesurface interface for a 3d geometry. The problem setup is following: I have a shakeflask 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 for clarity. Please help me. Thanks in advance. Jaswi 

June 4, 2007, 06:45 
Hello Normunds
I am extreme

#3 
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 8 
Hello Normunds
I am extremely sorry for that i posted my doubt at the wrong place. I will be careful next time. Thanks Kind regards Jaswi 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Nonslip Boundary condition  A.T.  Main CFD Forum  7  November 28, 2012 03:19 
SLIP BOUNDARY CONDITION  vas  FLUENT  11  August 6, 2012 06:36 
"Slip Boundary Condition,Help me Please"  Sohag  CFX  1  June 21, 2007 06:34 
Slip boundary Condition  Philip  FLUENT  2  July 29, 2006 03:37 
slip boundary condition  mohsen  Main CFD Forum  1  August 27, 2002 21:20 