CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   how to write header file for coalescence model in twoPhaseEulerFoam (

mehrdad_kbg May 20, 2013 14:33

how to write header file for coalescence model in twoPhaseEulerFoam
Hi everyone,
I am quite new to openfoam and trying to simulate the two phase flow using twoPhaseEulerFoam. I am adding coalescence model (attached here from an online thesis) to the solver but I do not have the header file for that. I appreciate if you help me to develop the header file.

namespace Foam
defineTypeNameAndDebug(HibikiIshiiC, 0);


const dictionary& interfaceDict,
const phaseModel& phasea,
const phaseModel& phaseb
coalescenceModel(interfaceDict, phasea, phaseb)


Foam::tmp<Foam::volScalarField>Foam::HibikiIshiiC: :C
const volScalarField& alpha,
const volScalarField& IAC,
const volScalarField& epsilon,
const volScalarField& Ur

) const


scalar GammaC = 0.005;
scalar Kc = 1.29;
scalar alphaMax = 0.52;

volScalarField dBuff = 6.0*alpha/IAC;

dimensionedScalar plusDS
dimensionSet(0, 1, 0, 0, 0, 0, 0),
scalar (1.0e-6)
volScalarField sourceRCa = - GammaC*pow(alpha,2.0)*pow(epsilon,1.0/3.0);
volScalarField sourceRCb = pow(dBuff+plusDS,11.0/3.0)*(alphaMax-alpha);
volScalaField sourceRCc = exp(-Kc*pow(phaseb-.rho(),1.0/2.0)
volScalarField sourceRC = sourceRCa/sourceRCb*sourceRCc;

return sourceRCa*scalar(1.0);

kmooney May 20, 2013 21:23

Honestly you might be better off just contacting the author of the thesis you got the source code from. If they are willing to publish the C file I can't imagine they wouldn't send you the header if you asked.

All times are GMT -4. The time now is 01:23.