CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   EulerLagrangeMapping (http://www.cfd-online.com/Forums/openfoam-solving/59933-eulerlagrangemapping.html)

 stephan November 13, 2006 05:11

Dear All, does OpenFoam inc

Dear All,

does OpenFoam include an Euler-Lagrange-Mapping? I want to map (and maybe smooth too) Lagrangian particle data on an Eulerian Phase.
any help would be appreciated!
Stephan

 hemph November 13, 2006 05:39

Hi Stephen. I create an alpha-

Hi Stephen. I create an alpha-field from lagrangian data using the code below. Hope it is of some help!

volScalarField Np
(
IOobject
(
"Np",
runTime.timeName(),
mesh,
IOobject::NO_WRITE
),
U.mesh(),
dimensionedScalar("zero", dimensionSet(0, 0, 0, 0, 0), 0.0),
U.boundaryField().types()
);

//reset alpha and Ua at each fluid timestep
alpha = dimensionedScalar("zero", alpha.dimensions(), 0.0);

for
(
discretePhase::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
{
label celli = elmnt().cell();
scalar d = elmnt().d();
Np[celli] = Np[celli] + 1;
scalar dVol = M_PI*::pow(d, 3.0)/6.0;

alpha[celli] += dVol/mesh.V()[celli];

}
//Rasmus

 stephan November 13, 2006 06:21

Thanks Rasmus, i have alrea

Thanks Rasmus,

i have already something similar but what i actually need is a real mapping algorithm, which takes care of the fact, that parts of a particle are in different cells. the fields obtained in this way should be smoother. this would be nice for time derivatives of the above mentioned field Np.

thanks for the help!
does anybody else has an idea how to get such smooth lagrangian fields?!
any help would be appreciated
Stephan

 All times are GMT -4. The time now is 17:24.