|
[Sponsors] |
January 17, 2019, 02:45 |
Writing a piece of code in OpenFOAM
|
#1 |
New Member
Join Date: Apr 2018
Posts: 17
Rep Power: 8 |
Hello All,
Please I want to add the attached equations as a momentum source to my reactingTwoPhaseEulerFoam's Ueqn but I don't know how to write the code in OpenFOAM Below is what I have done: [volScalarField Kdg = 1.9*160*pow(as,2)*phase1.mu()/(36*0.95)+(1.37*0.16*as*alpha1*rho1*mag(U1)/(6*0.95)); //effective interfacial area per unit volume volScalarField Kdl = 1.9*160*pow(as,2)*0.95*phase2.mu()/(36*pow(alpha2,2)+1)+(1.37*0.16*as*0.95*rho2*mag(U 2)/(6*alpha2+1)); volVectorField Udg = -f*mag(U1)*fvc::grad(alpha1)/(alpha1+1); //drift velocity, gas phase volScalarField Kd(fluid.Kd()); volVectorField Udl = -f*mag(U2)*fvc::grad(alpha2)/(alpha2+1); // drift velocity, liquid phase volVectorField F1 = alpha1*Kdg*Udg+0.95*Kd*(Udg-Udl); //gas dispersion force volVectorField F2 = (alpha2+1)*Kdl*Udl;//-0.95*Kd*(Udg-Udl); //liquid dispersion force] |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | September 21, 2016 12:50 |
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker | rt08 | OpenFOAM Installation | 1 | February 28, 2016 20:00 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 07:25 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |