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

solidParticle. How to know which dictionnaries are mandatories reading documentation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2021, 04:08
Default solidParticle. How to know which dictionnaries are mandatories reading documentation
  #1
Member
 
Join Date: Jun 2019
Posts: 41
Rep Power: 7
Voulet is on a distinguished road
Hi.

I'm following this tutorial of our famous Håkan Nilsson http://www.tfd.chalmers.se/~hani/kur...iclesInVOF.pdf in order to follow some solid particles in the DamBreakCase.
The code was written for the OF19 when I use OF 8. Reproducing this tutorial step by step leads to a converging solution but the positions of the particles are not written in the solution. I guess it's because it comes from the difference between the ESI 19 OF version and the foundation 8 OF.

I would like to be able to read the source documentation and understand which files are mandatory or not. It will be helpull through my journey to openfoam experience.
So let's start :

I've to add in the main file of my solver (for the preprocessing) the class from solidParticleCloud.H thus : #include "solidParticleCloud.H"
Next, i've to create an solidParticleCloud object called particles with:
solidParticleCloud particles(mesh)
I also add the

particles.move(g);

line at nearly the end of my solver, before the runTime.write();
Looking at the documentation solidParticleCloud.H I see that an IOdictionary is needed, from the class template Cloud

Code:
 class solidParticleCloud
 :
     public Cloud<solidParticle>
 {
     // Private Data
 
         const fvMesh& mesh_;
 
         IOdictionary particleProperties_;
 
         scalar rhop_;
         scalar e_;
         scalar mu_;
Looking at the .C part i see :

Code:
  Foam::solidParticleCloud::solidParticleCloud
 (
     const fvMesh& mesh,
     const word& cloudName,
     bool readFields
 )
 :
     Cloud<solidParticle>(mesh, cloudName, false),
     mesh_(mesh),
     particleProperties_
     (
         IOobject
         (
             "particleProperties",
             mesh_.time().constant(),
             mesh_,
             IOobject::MUST_READ_IF_MODIFIED,
             IOobject::NO_WRITE
         )
     ),
     rhop_(dimensionedScalar(particleProperties_.lookup("rhop")).value()),
     e_(dimensionedScalar(particleProperties_.lookup("e")).value()),
     mu_(dimensionedScalar(particleProperties_.lookup("mu")).value())
 {
     if (readFields)
     {
         solidParticle::readFields(*this);
     }
 }
and thus i guess that the particleProperties dictionnaries will be in case/constant/particleProperties and containing dimensioned Scalar.

Code:
FoamFile
{
     version     2.0;
     format      ascii;
     class       dictionary;
     object      particleProperties;
}
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
rhop rhop [ 1 -3  0  0  0  0  0] 1000;
e    e    [ 0  0  0  0  0  0  0] 0.8;
mu   mu   [ 0  0  0  0  0  0  0] 0.2;
//*************************************************************************//
Modifing the solver adding this file make my modified BreakDam to run fine. The positions and the size of the particules were not precised in my case since i don't see in the source codes wich part tells me to add them.


Could you please help me finding the clues in the source documentation to help me finding wich files are necessary ?


Since the solidParticleCloud class derive from the Cloud class I see in the file another class IOPosition that may help me to define the initial position of my particule but reading it with my few knowledges it doesn't help me to understand which and where i've to put some dictionnaries.


Thanks for your help. I hope to get more and more familiar with Open Foam.
Voulet is offline   Reply With Quote

Reply

Tags
solidparticlecloud


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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[swak4Foam] swakExpression not writing to log alexfells OpenFOAM Community Contributions 3 March 16, 2020 19:19
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 10:28
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 07:16
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 11:52


All times are GMT -4. The time now is 00:53.