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

Lagrangian particle implementation force OpenFOAM v9

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2023, 02:36
Default Lagrangian particle implementation force OpenFOAM v9
  #1
New Member
 
angelo
Join Date: Apr 2022
Posts: 8
Rep Power: 4
angel_97 is on a distinguished road
Hello,

I am dealing with lagrangian particle and I have to insert a new force inside the model.
I went in src\lagrangian\parcel\submodels\Momentum\ParticleF orces and I found a lot of force but I do not understand the line of the code.

For example this drag force:

template<class CloudType>
Foam::WenYuDragForce<CloudType>::WenYuDragForce
(
CloudType& owner,
const fvMesh& mesh,
const dictionary& dict
)
:
DenseDragForce<CloudType>(owner, mesh, dict, typeName)
{}


template<class CloudType>
Foam::WenYuDragForce<CloudType>::WenYuDragForce
(
CloudType& owner,
const fvMesh& mesh,
const dictionary& dict,
const word& typeName
)
:
DenseDragForce<CloudType>(owner, mesh, dict, typeName)
{}


template<class CloudType>
Foam::WenYuDragForce<CloudType>::WenYuDragForce
(
const WenYuDragForce<CloudType>& df
)
:
DenseDragForce<CloudType>(df)
{}


// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //

template<class CloudType>
Foam::WenYuDragForce<CloudType>::~WenYuDragForce()
{}


// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

template<class CloudType>
Foam::forceSuSp Foam::WenYuDragForce<CloudType>::calcCoupled
(
const typename CloudType:arcelType& p,
const typename CloudType:arcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
const scalar muc
) const
{
const scalar alphac =
this->alphacInterp().interpolate
(
p.coordinates(),
p.currentTetIndices()
);
const scalar CdRe = SchillerNaumannDragForce<CloudType>::CdRe(alphac*R e);

return forceSuSp
(
Zero,
0.75*(mass/p.rho())*CdRe*muc*pow(alphac, -2.65)/(alphac*sqr(p.d()))
);
}

If someone can explain me line by line i such way I will be able to create a new force.

Thank you,

Best,

Angel
angel_97 is offline   Reply With Quote

Reply


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
How to output the drag force on particle in LPT OpenFoam aerosjc OpenFOAM 2 November 17, 2022 09:49
Lagrangian Particle Tracking for Bubbles using OpenFoam farzadmech OpenFOAM Programming & Development 1 September 7, 2020 02:45
Request for Lagrangian Particle Tracking Validation or Verification Paper Mojtaba.a OpenFOAM Verification & Validation 6 May 23, 2016 01:47
OpenFOAM lagrangian particle tracking solver C++ developer needed hampycalc CFD Freelancers 1 May 18, 2016 08:46
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55


All times are GMT -4. The time now is 03:02.