Thanks in advance. ]]>

I'm running a multiphase case with regular waves (using waveFoam) passing a vertical surface piercing cylinder and I'm trying to calculate the forces and force coefficients. I have them set up and they are being calculated and in the right place, but the values look very very wrong.

1) First of all, the values for the drag and lift coefficients are oscillating... does this suggest that they are not converging? I expected to see one value after the wave has reached the cylinder. The values not only are changing, but massively increase.

2) Is it even possible to use the forces and forceCoeffs function objects as they are with a multiphase solver?? I'm wondering if I have defined the phases incorrectly? Or if I need to separate the U and p values somehow into U.water and U.air, etc?

For instance, I am confused in my transportProperties file because I have the transport model set to Newtonian, so I commented out all other information (BirdCarreauCoeffs, CrossPowerLawCoeffs), as shown below:

Code:

`phases (water air);`

water

{

transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;

rho rho [ 1 -3 0 0 0 0 0 ] 1028;

/*

CrossPowerLawCoeffs

{

nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;

nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;

m m [ 0 0 1 0 0 0 0 ] 1;

n n [ 0 0 0 0 0 0 0 ] 0;

}

BirdCarreauCoeffs

{

nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;

nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;

k k [ 0 0 1 0 0 0 0 ] 99.6;

n n [ 0 0 0 0 0 0 0 ] 0.1003;

}

*/

}

air

{

transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 1.568e-05; //1.48e-05; --> current measurement for kinematic viscosity found at engineeringtoolbox.com

rho rho [ 1 -3 0 0 0 0 0 ] 1;

/*

CrossPowerLawCoeffs

{

nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;

nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;

m m [ 0 0 1 0 0 0 0 ] 1;

n n [ 0 0 0 0 0 0 0 ] 0;

}

BirdCarreauCoeffs

{

nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;

nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;

k k [ 0 0 1 0 0 0 0 ] 99.6;

n n [ 0 0 0 0 0 0 0 ] 0.1003;

}

*/

}

sigma sigma [ 1 0 -2 0 0 0 0 ] 0.00;

My forces file is:

Code:

`forces_object`

{

type forces;

functionObjectLibs ( "libforces.so" );

enabled true;

outputControl timeStep;

outputInterval 1;

pName p;

UName U;

rhoName rhoInf; // Incompressible solver

log on;

rhoInf 1.0; // Fluid density

patches ( cylinder);

CofR (0 0 0);

pitchAxis (0 0 1); // Gives moment coefficient

}

Code:

`forceCoeffs_object`

{

type forceCoeffs;

functionObjectLibs ("libforces.so");

patches (cylinder);

pName p;

Uname U;

rhoName rhoInf; // Reference Density

rhoInf 1.0; // Density/1000

log true; // Dump to file -- change to false to not save a file

CofR (0.0 0 0); // Centre of rotation

liftDir (0 1 0); // Direction of lift coefficient ---> y-direction (transverse to flow) ?????

dragDir (1 0 0); // Direction of drag coefficient ---> drag acts in opposite direction to flow (-x)

pitchAxis (0 0 1); // Pitch moment axis --> changed from pitchAxis (0 0 1)

magUInf 0.4622; // free stream velocity magnitude

lRef 6.0; // reference length (cylinder diameter)

Aref 1.488; // reference area: lref * zmesh (zmesh is approx. pi*D/76)

outputControl timeStep;

outputInterval 1;

}

I'm not very experienced with Openfoam.

I want to simulate a tank that is filled 50/50 with oil and gas. I want to apply a heat flux to the wall (this heat flux represent a heat load from a fire). The tank is closed so the heat flux on the wall will increase the pressure inside the tank. After som time a release value will open and depressurization starts.

Have anyone here any experience with solvers that will work for this type of problem?

I am currently looking at solver reactingTwoPhaseEulerFoam and compressibleMixingPhaseChangeFoam.

- Thomas Engen ]]>

Code:

`Usage`

=====

pyFoamRunner.py [options] <foamApplication> <caseDir> <caseName> [foamOptions]

pyFoamRunner.py: error: Too few arguments (3 needed, 1 given)

Code:

`--> FOAM FATAL ERROR:`

Wrong number of arguments, expected 0 found 2

P.s: When I go back to the OpenFOAM 3.0.0 version, the command works flawlessly. Also, this is the latest PyFoam version. ]]>

I made a simulation with OpenFOAM and now i want to plot the maximum Temperature values over Time.

With Plot Selection Over Time i can not choose any flow field (U,T,p,...).

Or do i have to use the Calculator?

Could someone please help.

Best regards,

Timucin ]]>

i am using interFoam and i want to implement a very simple degassing boundary condition.

I would like to use pressureInletOuteltVelocity-BC or inletOutlet-BC or directionMixed-BC.

I want an outlet-BC which only lets the fluid (Gas and Liquid) out, if the alpha-value is < 0.2.

I think accesing to the patch values of alpha is not the main problem.

The most important problem is which boundary should I use?

And how do I have to change the variables of the BC? (valuefraction, phip, refValue, refGradient, or maybe other variables?

Best regards,

Timucin ]]>

The original surface tension term mathematically can be expressed as Kappa*sigma*grad(alpha1). And interFoam expresses this term as fvc::interpolate(interface.sigmaK())*fvc::snGrad(a lpha1)

Based on my understanding, what interFoam does is to calculate the surface tension on face center and then reconstruct to the cell center. Therefore, "fvc::interpolate(interface.sigmaK())*fvc::snGrad( alpha1)" is a scalar rather than a vector.

What I am trying to do is to replace the above mentioned term by another function aiming to calculate the force between any cell to the rest of the cells in the domain.

Here is my code added to createFileds.H. It complies and runs OK, but no matter how long I run the code, the results of test case does not make sense. BTW, my test case is to place a air rectangle in a liquid box and see if the rectangle can become a circle eventually. Test case does not make sense means that the air rectangle does not change its shape.

Code:

`volVectorField newSurfaceTension //create volume vector field`

(

IOobject

(

"newSurfaceTension",

runTime.timeName(),

mesh,

IOobject::NO_READ,

IOobject::NO_WRITE

),

mesh,

dimensionedVector("newSurfaceTension",dimensionSet(1,-4,-2,0,0,0,0),Foam::vector(0,0,0))

);

forAll(mesh.C(),celli) //calculate surface tension on celli

{

forAll(mesh.C(),cellj) // relation between the celli to the rest of the cells in the domain

{

if( ((alpha1[celli]<0.5)&& (alpha1[cellj]<0.5)) || ((alpha1[celli]>=0.5)&& (alpha1[cellj]>=0.5)) ) //if both less than 0.5 or both greater than 0.5

{

s=constant1;

}

else // if one is below 0.5 and the other is above 0.5

{

s=constant2;

}

newSurfaceTension[celli]=newSurfaceTension[celli]+(mesh.C()[celli]-mesh.C()[cellj])*s*constant3*mag(mesh.C()[celli]-mesh.C()[cellj]); // my formula

}

}

surfaceVectorField newSurfaceTension1("newSurfaceTension1",fvc::interpolate(newSurfaceTension)); //convert from volVectorField to surfaceVectorField

const surfaceVectorField& sf=mesh.Sf();

surfaceScalarField newSurfaceTension2("newSurfaceTension2",newSurfaceTension1 & sf); //covert from surfaceVectorField to surfaceScalarField

After that I will update surface tension term in UEqn.H and pEqn.H. Here I use UEqn.H as an example.

Code:

` fvVectorMatrix UEqn`

(

fvm::ddt(rho, U)

+ fvm::div(rhoPhi, U)

+ turbulence->divDevRhoReff(rho, U)

);

UEqn.relax();

if (pimple.momentumPredictor())

{

solve

(

UEqn

==

fvc::reconstruct

(

(

//fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)

newSurfaceTension2

- ghf*fvc::snGrad(rho)

- fvc::snGrad(p_rgh)

) * mesh.magSf()

)

);

}

I am using counterFlowFlame2D tutorial of reactingFoam solver in OF3.0, and I want to try to calculate using other gas species.

Then, I became aware that all the sutherland parameters of this tutorial have a same value.:eek:

Is it why?

A sutherland parameter should be different value in each specie, shouldn't it?:confused:

I have thought that we write the values according to each specie in a tutorial, and the Y[i]-dependent viscosity of mixed gas is calculated in a library during executing the solver.

Am I wrong?:(

Could you give me some comment or advise?

I look forward to your reply.

Sincerely,

KeiJun ]]>

1) UPrime2Mean is a field that is written down in time directories using the FieldAverage functionObject, does 0.5*(UPrime2Mean) represent the resolved KE? The UPrime2Mean vector has 6 values, of these only 3 - UPrime2Meanxx, UPrime2MeanYY and UPrime2Meanzz contribute to the resolved KE.

2) How can I get these only 3 values outputted for a certain probe location, in a file (perhaps using function objects)? I tried using

I am looking for an easier way to plot the k/(0.5*[<Uprime_xx^2> + <Uprime_yy^2> +<Uprime_zz^2>] + k) plot, preferably using function objects.

In short, how can I get the aforementioned 3 components written to a text file in xy format for a particular probe location? ]]>

I would like to subtract a constant value (the input velocity 0.0012 m/s) from my simulated velocity in the x-direction v_x. That way I get just the changes of the velocity v_xnew.

I simulated a Karmann Vortex street around a cylinder and I want to get w nice arrow field for the spinning velocity. If I dont correct my velocity, I get arrows going in one direcktion, that doesnt look like Kamman Street at all (picture1). I already manage to make it manual for one time step (picture2).

How can i make it for the other time steps, is there a function that I can youse?

picture1: without correction of the velocity

picture2: after manual velocity correction (v_xnew = v_x-0.0012)

When i run interFoam, i get this output error:

--> FOAM FATAL IO ERROR:

keyword sourceName is undefined in dictionary "/home/gabriele/OpenFOAM/gabriele-2.4.0/run/prova/system/controlDict.functions.faceObj1"

file: /home/gabriele/OpenFOAM/gabriele-2.4.0/run/prova/system/controlDict.functions.faceObj1 from line 55 to line 87.

From function dictionary::lookupEntry(const word&, bool, bool) const

in file db/dictionary/dictionary.C at line 442.

Below the script that i put in controlDict:

functions

{

faceObj1

{

type faceSource;

functionObjectLibs ("libfieldFunctionObjects.so");

enabled true;

outputControl outputTime;

// Output to log&file (true) or to file only

log true;

// Output field values as well

valueOutput true;

// Type of source: patch/faceZone/sampledSurface

source sampledSurface;

// if sampledSurface: dictionary with a sampledSurface

// Note: will not sample surface fields.

sampledSurfaceDict

{

// Sampling on constantPlane

sourceName piano1;

type plane; // always triangulated

basePoint (0.41 0 0);

normalVector (-1 0 0);

}

// Operation: areaAverage/sum/weightedAverage ...

operation areaAverage;

fields

(

p

);

}

}

Someone has an idea from where is the problem?

Thank you ]]>

I'm setting a low-Re stady-state case using simpleFoam. I'd like to use KOmegaSST turbulent model solving directly the BL because I set y+ lower than 1. I guess I have to set k=0, but how can I set omega at the wall, if I don't want to use any wall-functions?

Thank you in advance. ]]>

I am considering OpenFOAM and its immersed boundary solver to to simulate blood flow through an aortic valve. In simple terms, the geometry is a tube which has thin leaflets inside. These leaflets undergo large periodic deformation. Do you think that OpenFOAM is currently capable of simulating such a problem?

I am aware of OpenFOAM Extend, but I have not found any references to work performing a similar simulation.

Thank you,

Emilie ]]>

I am trying to use a temperature dependent ideal gas law for the density in the chtMultiRegionSimpleFoam solver. The reason why I can't use the normal ideal gas law option is because I have a polynomial equation for mu, thermal conductivity as well as Cp. I either have to use PengRobinsonGas or give a polynomial for the temperature dependent density (assuming constant pressure). Is there a way to have a negative power in this polynomial to effectively reconstruct the ideal gas law but then define it in the thermophysicalProperties?

Kind regards,

Gregor Alan ]]>

I am trying to figure out how paticle heating is implemented in reactingParcelFoam when using the Ranz Marshall heat transfer model. As I could figure out in RanzMarshall.C OpenFOAM uses the Nusselt number

Nu=2+0.6*sqrt(Re)*cbrt(Pr)

However, I cannot find the differential equation describing the heat transfer between fluid and lagrangian particle. I assume something like

mparticle*Cpparticle*dTparticle/dt=Nu*lambda/dparticle*Ap*(Tfluid-Tparticle)

should be implemented.

Can anybody give me a hint were the heat transfer between fluid and particle is implemented in reactingParcelFoam?

Best kalei ]]>