CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Plotting Surface tension force with interfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 2 Post By hk318i
  • 3 Post By Mahmoud_aboukhedr
  • 4 Post By hk318i

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 11, 2015, 18:18
Default Plotting Surface tension force with interfoam
  #1
Member
 
Mahmoud Aboukhedr
Join Date: Feb 2014
Location: London
Posts: 40
Rep Power: 12
Mahmoud_aboukhedr is on a distinguished road
ear Foamrs,

I was looking in all the threads for a clear way to plot the surface tension forces, but I could not find any.

So i tried to change the way interfoam (2.2.0) calculate the forces in interFoam,

So I changed the interface.C file and added this line

surfaceScalarField f = fvc::interpolate(interface.sigmaK())*fvc::snGrad(a lpha1);

Then I changed the Uequ.H File to be
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
+ turbulence->divDevRhoReff(rho, U)
);

UEqn.relax();

if (pimple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
f
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
) * mesh.magSf()
)
);
}

by doing so, no the solver calculate the surface tension force separately, then added to the momentum equation,
I tried it and it compiles and works fine...

Now I need to plot for the (f) and the interface curvature (K) in the processioning.

So I added these lines to the create field file;

volVectorField f
(
IOobject
(
"f",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedVector("f",dimMass/(dimLength*dimLength*dimTime*dimTime), vector(0,0,0))
);



volScalarField K
(
IOobject
(
"K",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimless/dimTime
);

It compile fine .... but the problem that ;; when i plot for f or K ... the field is empty ..

So anyone can help ???
I can c f and K in each time step while am postpossessing .. but zero values ..

Any help will do ..

thanks
Mahmoud
Mahmoud_aboukhedr is offline   Reply With Quote

 


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 11:12
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
Surface Tension Test Cases sega OpenFOAM Running, Solving & CFD 2 March 8, 2011 12:19
surface tension force Ray Main CFD Forum 0 October 17, 2001 15:42
gravitational force for free surface flow Jongtae Kim Main CFD Forum 1 July 2, 2000 11:57


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