|
[Sponsors] |
InterFoam+ Surface tension dependent on temperature |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
September 30, 2009, 13:44 |
InterFoam+ Surface tension dependent on temperature
|
#1 |
Member
Ramesh Yapalparvi
Join Date: Jun 2009
Posts: 53
Rep Power: 16 |
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 |
|
October 1, 2009, 07:07 |
|
#2 |
Senior Member
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17 |
If you read the files "interfaceProperties.C" and "interfaceProperties.H" you will see how to set the surface tension, sigma, as temperature dependent.
|
|
October 27, 2009, 05:45 |
|
#3 |
New Member
Alex Gatej
Join Date: Jul 2009
Location: Aachen, Germany
Posts: 11
Rep Power: 16 |
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? |
|
October 27, 2009, 10:50 |
|
#4 |
Senior Member
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17 |
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(); |
|
July 30, 2012, 02:25 |
plz answer me???
|
#5 |
Member
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13 |
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??? |
|
August 1, 2012, 11:11 |
|
#6 |
Senior Member
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 17 |
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 |
|
August 2, 2012, 05:21 |
Thanks for your answer Isabel:
|
#7 |
Member
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13 |
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 |
|
February 19, 2016, 11:51 |
|
#8 |
New Member
Rimsha
Join Date: Jan 2016
Posts: 25
Rep Power: 10 |
thanks found my problem
Last edited by block; March 4, 2016 at 11:30. |
|
|
|
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 |