CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

coding of antal lubrication force

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   May 15, 2012, 17:06
Default coding of antal lubrication force
Jeong Kim
Join Date: Feb 2010
Posts: 42
Rep Power: 7
enoch is on a distinguished road

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?
enoch is offline   Reply With Quote

Old   May 16, 2012, 01:57
Senior Member
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 13
Bernhard is on a distinguished road
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.
Bernhard is offline   Reply With Quote

Old   May 17, 2012, 03:38
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 14
l_r_mcglashan will become famous soon enough
Never tested them but you can find the Antal/Frank models here:
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   May 18, 2012, 13:52
Jeong Kim
Join Date: Feb 2010
Posts: 42
Rep Power: 7
enoch is on a distinguished road
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.

-I$(LIB_SRC)/finiteVolume/lnInclude \

-lfiniteVolume \

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
enoch is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 12:41
Two-phase air water flow problems by activating Wall Lubrication Force challenger85 CFX 5 November 5, 2009 06: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

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