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

InterFoam+ Surface tension dependent on temperature

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 30, 2009, 13:44
Default InterFoam+ Surface tension dependent on temperature
  #1
Member
 
Ramesh Yapalparvi
Join Date: Jun 2009
Posts: 53
Rep Power: 16
yapalparvi is on a distinguished road
Hi,

I have been able to add energy equation to the interFoam solver and do some test cases with that and it works OK. In this case the surface tension was a constant. Now I would like to make it dependent on temperature. Any help?

Thanks
Ramesh
yapalparvi is offline   Reply With Quote

Old   October 1, 2009, 07:07
Default
  #2
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
If you read the files "interfaceProperties.C" and "interfaceProperties.H" you will see how to set the surface tension, sigma, as temperature dependent.
isabel is offline   Reply With Quote

Old   October 27, 2009, 05:45
Default
  #3
New Member
 
Alex Gatej
Join Date: Jul 2009
Location: Aachen, Germany
Posts: 11
Rep Power: 16
AlGates is on a distinguished road
Think, I have the same problem here. interfaceProperties reads the sigma-values in the constructor, but this happens only at the beginning of the simulation and the constructor is never called again.

Should there be added a new function to be able to change the values of sigma?
AlGates is offline   Reply With Quote

Old   October 27, 2009, 10:50
Default
  #4
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
I have implemented this code:


volVectorField gradgamma = fvc::grad(gamma);
surfaceVectorField gradgammaf = fvc::interpolate(gradgamma);
surfaceVectorField nHatfv = gradgammaf/(mag(gradgammaf) + SMALL); // normal vector
surfaceScalarField nHatf_ = nHatfv & mesh.Sf();
volScalarField K_ = -fvc::div(nHatf_); //curvature


The momentum equation would change this line:


solve
(
UEqn
==
fvc::reconstruct
(
(
fvc::interpolate(sigma*K_)*fvc::snGrad(gamma)
- ghf*fvc::snGrad(rho)
- fvc::snGrad(pd)
) * mesh.magSf()
)
);


And the pressure equation would change this:


phi = phiU +
(
fvc::interpolate(sigma*K_)*fvc::snGrad(gamma)
- ghf*fvc::snGrad(rho)
)*rUAf*mesh.magSf();



isabel is offline   Reply With Quote

Old   July 30, 2012, 02:25
Default plz answer me???
  #5
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13
vahid.najafi is an unknown quantity at this point
Hi Dear Isabel.
I want to add surface tension(sigma) in a code,for this added :
#include ''fvCFD.H''
#include ''interfaceproperties.H''
fvc::interpolate(interface.sigma())

in this code:
Foam::tmp<Foam::volScalarField>
Foam:haseChangeTwoPhaseMixtures::SchnerrSauer: Coeff
(
const volScalarField& p
) const
{
volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
volScalarField rho
(
limitedAlpha1*rho1() + (scalar(1) - limitedAlpha1)*rho2()
);
return

//......I want to change it( <<sigma>> surface tension multiple in it):
(3*rho1()*rho2())*sqrt(2/(3*rho1()))* (fvc::interpolate(interface.sigma()))
*rRb(limitedAlpha1)/(rho*sqrt(mag(p - pSat()) + 0.01*pSat()));
//.................................................. ......
}
dont successful wmake, and seen(was not declared ):
phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C:113: error: 'interface' was not declared in this scope
make: *** [Make/linux64GccDPOpt/SchnerrSauer.o] Error 1
please help me,How to correct this problem???
vahid.najafi is offline   Reply With Quote

Old   August 1, 2012, 11:11
Default
  #6
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
Dear vahid.najafi,

I am not sure which your the problem. Your solver should compile Ok (I am working with OpenFOAM 1.7 version). Try these ideas:

- Write "interfaceProperties.H" instead of "interfaceproperties.H"
- Add the line #include "twoPhaseMiture.H"

If these changes do not work do not hesitate to answer again
isabel is offline   Reply With Quote

Old   August 2, 2012, 05:21
Default Thanks for your answer Isabel:
  #7
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13
vahid.najafi is an unknown quantity at this point
Hi Dear Isabel.
Thanks for your answer.
I worked what ,you said to me :

I Changed solver, As follows:

#include "fvCFD.H"
#include "twoPhaseMixture.H"
#include "interfaceProperties.H"


// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam:haseChangeTwoPhaseMixtures::SchnerrSauer::r Rb
(
const volScalarField& limitedAlpha1
) const
{
return pow
(
((4*constant::mathematical:i*n_)/3)*fvc::interpolate(interface.sigma())
*limitedAlpha1/(1.0 + alphaNuc() - limitedAlpha1),
1.0/3.0
);
}


but i seen again:
geTwoPhaseMixtures::SchnerrSauer::rRb(const Foam::volScalarField&) const’:
phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C:83: error: 'interface' was not declared in this scope
make: *** [Make/linux64GccDPOpt/SchnerrSauer.o] Error 1

an other question :

twoPhaseMixture.H in directury in src files:
transportModels/incompressible/incompressibleTwoPhaseMixture \

but sigma is not Definition in this code!!!

The directory above is correct???That is your purpose(for twoPhaseMiture.H)?

regards
Vahid Najafi
vahid.najafi is offline   Reply With Quote

Old   February 19, 2016, 11:51
Default
  #8
New Member
 
Rimsha
Join Date: Jan 2016
Posts: 25
Rep Power: 10
block is on a distinguished road
thanks found my problem

Last edited by block; March 4, 2016 at 11:30.
block is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Surface tension asder CFX 2 August 4, 2008 09:41
Surface Tension Gradient Alisher FLUENT 0 March 26, 2008 04:26
UDF for surface tension gradient kiran FLUENT 2 July 15, 2003 12:00
surface tension in VOF New1 FLUENT 0 April 10, 2002 01:06
Turbulence model in flow driven by surface tension Z. ZENG Main CFD Forum 7 April 28, 1999 07:18


All times are GMT -4. The time now is 20:39.