# increasing volume fraction in closed domain with compressibleInterFoam

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

 May 14, 2014, 12:58 increasing volume fraction in closed domain with compressibleInterFoam #1 Member   Victor-S. Eberhart Join Date: Oct 2011 Posts: 35 Rep Power: 7 Hi Foamers! I managed to extend the compressibleInterFoam solver by a time varying acceleration which, in my case, simulates a periodic motion and is provided by a file containing the time-acceleration tuples. As you can see in the excerpt of my accFoam.C, I only introduced the acceleration in z-axis direction and defined a vector called acc which also contains the gravitation: Code: ``` while (runTime.run()) { #include "readTimeControls.H" #include "CourantNo.H" #include "setDeltaT.H" runTime++; // --- time varying acceleration interpolationTable lookup("acceleration.dat"); scalar acc_X = 0.0; scalar acc_Y = 0.0; scalar acc_Z = lookup(runTime.value());//timeSeriesAcceleration; Info<< "Acceleration in z-direction = " << acc_Z << nl << endl; const dimensionedScalar gunits("gunits", dimensionSet(0,1,-2,0,0,0,0), 1.0); dimensionedVector acc=g + vector(acc_X,acc_Y,acc_Z)*gunits; Info<< "Time = " << runTime.timeName() << nl << endl; // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) ``` In order to take the acceleration into account I added the acceleration multiplied by my mixture density to the UEqn.H file: Code: ``` fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence->divDevRhoReff(U) - rho*acc );``` Also, I extended the energy equation in the TEqn.H file as follows: Code: ``` fvScalarMatrix TEqn ( fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::laplacian(twoPhaseProperties.alphaEff(turbulence->mut()), T) + ( fvc::div(fvc::absolute(phi, U), p) + fvc::ddt(rho, K) + fvc::div(rhoPhi, K) - rho * (acc & U) )``` My test case, a closed test tube filled with 50% liquid sodium and 50% air "shaken" along the longitudinal axis according to a prescribed oscillating motion, yields good results for the liquid phase kinetic energy compared to a CFX case. However, during the simulation, the total liquid phase volume fraction defined by the initial filling level (0.5) is constantly increasing and reached a value of 0.58 so far. I have a suspicion that it has something to do with the compressibility of my fluids. Speaking of which, I have doubts about the assigned value of R in my thermophysical properties for sodium. I had no idea how to calculate it, so I looked at the thermophysicalProperties.mercury from the compressibleMultiphaseInterFoam damBreak4Phase tutorial case and took a similar value, somy thermophysicalProperties.sodium looks like that: Code: ```thermoType { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectFluid; specie specie; energy sensibleInternalEnergy; } mixture { specie { nMoles 1; molWeight 22.99; } equationOfState { R 5000; rho0 852; } thermodynamics { Cp 1277; Hf 0; } transport { mu 0.000264; Pr 0.00496; } }``` I scanned the forum but only found threads related to decreasing alpha values. Maybe someone of you has already run into that problem before and found a solution for it. Thanks a lot, Victor

 Tags acceleration, compressibleinterfoam, multiphase, volume fraction

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post multiphase-flow FLUENT 4 August 7, 2014 10:35 sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47 eric weddle CFX 0 September 26, 2011 05:02 paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 22:14 SSL FLUENT 2 January 26, 2008 12:55

All times are GMT -4. The time now is 19:00.