|
[Sponsors] |
May 15, 2012, 17:06 |
coding of antal lubrication force
|
#1 |
Member
Jeong Kim
Join Date: Feb 2010
Posts: 42
Rep Power: 16 |
nw is the unit normal pointing away from the wall. v1-v2 is is the relative velocity difference between phases, in the plane of the nearby wall surface (that is, orthogonal to nw). yw is the distance to the nearest wall. magUr = mag(Ur); sqrmagUr = sqr(magUr); volScalarField Cwl = max(0.0, (Cw1/da)+(Cw2/postion.y); volVectorField wallLubForce = Cwl*alpha*rhob*sqrmagUr*position.y.normal postion.y is yw. position.y.normal is nw. How can I express yw and nw in the foam? |
|
May 16, 2012, 01:57 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
You can use the files that are located in src/finiteVolume/fvMesh/wallDist . I think you can get wall distance and normal vectors from these files.
For synthax you can have a look at LES turbulence model vanDriestDelta, where the wall distance is used. For the normal vectors I don't know an example, but the reflectionVectors files seem to be what you need. |
|
May 17, 2012, 03:38 |
|
#3 |
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23 |
Never tested them but you can find the Antal/Frank models here:
https://github.com/lrm29/multiphaseSurfaceForces
__________________
Laurence R. McGlashan :: Website |
|
May 18, 2012, 13:52 |
|
#4 |
Member
Jeong Kim
Join Date: Feb 2010
Posts: 42
Rep Power: 16 |
I'm sorry for my repeating question. I'm still not not sure how I can get a normal distance and a wall normal unit vector. Here is what I did.
I Included two header files in the main code. #include "wallDistReflection.H" #include "wallDist.H" ======== I updated option. EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools In the code, // Distance to nearest wall: wallDist.H volScalarField yDist = y.n(); // Wall normal unit vector: wallDistReflection.H volScalarField Cwl = myScalar/yDist; Info << "Cwl= " << Cwl; But I've got compilation errors shown below. How can get a yDist and a normal unit vector? Making dependency list for source file icoFoamMod.C SOURCE=icoFoamMod.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/jeong/OpenFOAM/openfoam210/src/finiteVolume/lnInclude -I/home/jeong/OpenFOAM/openfoam210/src/meshTools/lnInclude -IlnInclude -I. -I/home/jeong/OpenFOAM/openfoam210/src/OpenFOAM/lnInclude -I/home/jeong/OpenFOAM/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/icoFoamMod.o /home/jeong/OpenFOAM/openfoam210/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’: /home/jeong/OpenFOAM/openfoam210/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ /home/jeong/OpenFOAM/openfoam210/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ /home/jeong/OpenFOAM/openfoam210/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ In file included from icoFoamMod.C:131:0: exportDataLastTime.H:14:25: error: ‘y’ was not declared in this scope exportDataLastTime.H:22:38: error: ‘struct Foam::volScalarField’ has no member named ‘n’ make: *** [Make/linux64GccDPOpt/icoFoamMod.o] Error 1 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Force can not converge | colopolo | CFX | 13 | October 4, 2011 22:03 |
Tomiyama wall lubrication force | Edy | OpenFOAM | 10 | December 13, 2010 11:41 |
Two-phase air water flow problems by activating Wall Lubrication Force | challenger85 | CFX | 5 | November 5, 2009 05:44 |
Adding Van der Waals force by coding UDF | Long Sang | FLUENT | 1 | June 23, 2008 07:44 |
DEFINE_CG_MOTION and pressure force | Teo Fumagalli | FLUENT | 0 | April 11, 2008 10:25 |