CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Adding a new parameter to the injected particles

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By farzadmech

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2021, 16:24
Default Adding a new parameter to the injected particles
  #1
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 204
Rep Power: 7
farzadmech is on a distinguished road
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
farzadmech is offline   Reply With Quote

Old   March 30, 2021, 10:24
Default Extra explanation
  #2
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 204
Rep Power: 7
farzadmech is on a distinguished road
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
        )
    ),
Now the main question is that how can I add another parameter like a mass fraction(Y) to the Lagrangian parameters?


Thanks,
Farzad
sourav90 likes this.
farzadmech is offline   Reply With Quote

Reply

Tags
injection, lagrangian, parameter, particles


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the importance of SPREAD PARAMETER in a rosin rammler particles distribution? mariconeagles96 Fluent Multiphase 1 May 9, 2018 14:55
conjugateHeatFoam + interFoam farhagim OpenFOAM Programming & Development 15 July 19, 2016 07:55
What limits the amount of injected lagrangian particles? Kabra OpenFOAM Running, Solving & CFD 0 October 12, 2015 07:57
[PyFoam] running pyFoam(Plot)Runner.py in parallel Studi OpenFOAM Community Contributions 10 September 6, 2015 16:38
particles model ati_ros61 FLOW-3D 3 December 6, 2009 16:03


All times are GMT -4. The time now is 20:40.