|
[Sponsors] |
Adding a new parameter to the injected particles |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 29, 2021, 17:24 |
Adding a new parameter to the injected particles
|
#1 |
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8 |
Dear friend
I want to add a property(exactly like "rho" for particles) to my particle properties. Actually I want to add "Mass Fraction" at the injection to my particles. I know that I should change KinematicParcel.C and KinematicCloud.C (constructor part), but it is a little ambiguous to me which one is an Eulerian parameter and which one is a Lagrangian parameter(I make them RED). Lets I copy the code here; Code:
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class CloudType> Foam::KinematicCloud<CloudType>::KinematicCloud ( const word& cloudName, const volScalarField& rho, const volVectorField& U, const volScalarField& mu, const dimensionedVector& g, bool readFields ) : CloudType(rho.mesh(), cloudName, false), kinematicCloud(), cloudCopyPtr_(nullptr), mesh_(rho.mesh()), particleProperties_ ( IOobject ( cloudName + "Properties", rho.mesh().time().constant(), rho.mesh(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), outputProperties_ ( IOobject ( cloudName + "OutputProperties", mesh_.time().timeName(), "uniform"/cloud::prefix/cloudName, mesh_, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ) ), Thanks, Farzad |
|
March 30, 2021, 11:24 |
Extra explanation
|
#2 |
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8 |
Dear friends
After reviewing the code for few times, I remembered that I remember that the green lines are for Eulerian rho(density of Fluid) and red lines are for Lagrangian(density of particle) as below; [CODE] Code:
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class CloudType> Foam::KinematicCloud<CloudType>::KinematicCloud ( const word& cloudName, const volScalarField& rho, const volVectorField& U, const volScalarField& mu, const dimensionedVector& g, bool readFields ) : CloudType(rho.mesh(), cloudName, false), kinematicCloud(), cloudCopyPtr_(nullptr), mesh_(rho.mesh()), particleProperties_ ( IOobject ( cloudName + "Properties", rho.mesh().time().constant(), rho.mesh(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE )[/COLOR] ), outputProperties_ ( IOobject ( cloudName + "OutputProperties", mesh_.time().timeName(), "uniform"/cloud::prefix/cloudName, mesh_, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ) ), Thanks, Farzad |
|
Tags |
injection, lagrangian, parameter, particles |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What limits the amount of injected lagrangian particles? | Kabra | OpenFOAM Running, Solving & CFD | 1 | May 7, 2024 12:00 |
What is the importance of SPREAD PARAMETER in a rosin rammler particles distribution? | mariconeagles96 | Fluent Multiphase | 1 | May 9, 2018 15:55 |
conjugateHeatFoam + interFoam | farhagim | OpenFOAM Programming & Development | 15 | July 19, 2016 08:55 |
[PyFoam] running pyFoam(Plot)Runner.py in parallel | Studi | OpenFOAM Community Contributions | 10 | September 6, 2015 17:38 |
particles model | ati_ros61 | FLOW-3D | 3 | December 6, 2009 17:03 |