CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Write cloudFunction fields as VTK during the runtime

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2024, 09:55
Default Write cloudFunction fields as VTK during the runtime
  #1
New Member
 
Ege Batmaz
Join Date: Dec 2018
Location: Germany
Posts: 13
Rep Power: 7
egebat7 is on a distinguished road
Dear Foamers,

I am using vtkCloud function to write lagrangian cloud field data into the postProcessing/ folder during the runtime. I am additionally calculating few more fields using the CloudFunctions class in my cloud properties file: Nusselt Number, Particle Reynolds Number and Heat Transfer Coefficient. However, vtkCloud doesn't write those additionally calculated fields (Nu, Re_p, ...) to the postProcessing/ folder even I am selecting to write all fields. Is there a way to write those additionally calculated fields as a postProcessing/VTK format during the runtime?


controlDict:
Code:
    cloudWrite1
    {
        type            vtkCloud;
        libs            (lagrangianFunctionObjects);
        writeControl    runTime;
        writeInterval   0.01;
        format          binary;

        cloud           reactingCloud1;
        fields          (".*");

    }
reactingCloud1Properties:
Code:
cloudFunctions
{
    NusseltNumber1
    {
        type NusseltNumber;
    }
    
    ReynoldsNumber1
    {
        type ReynoldsNumber;
    }
    
    HeatTransferCoeff1
    {
        type HeatTransferCoeff;
    }
 }
Best regards,


Ege
egebat7 is offline   Reply With Quote

Old   January 3, 2024, 12:26
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
I took a look and I think you could have a try at just copying in data from the cloud itself.
Take a look at the writeCloud() in the vtkCloud.C code and you'll see that it uses a local temporary registry (obrTmp) where all of the normal particle output is written.
Next if you examine (for example) the KinematicReynoldsNumber.C code, you'll see that the postEvolve method calculates the Reynolds number and dumps it onto the cloud itself.
So based on this knowledge, it should be possible to just add in a sub-selection back into the obrTmp or even just write the additional registry for label/scalar/vector types (similar to around Line 290 of the vtkCloud.C file).


Although still some snags to be expected with the filtering mechanism, it is probably a good place for you to start.


EDIT: added as https://develop.openfoam.com/Develop.../-/issues/3094
egebat7 likes this.

Last edited by olesen; February 1, 2024 at 08:54.
olesen is offline   Reply With Quote

Reply

Tags
cloudfunctions, vtkcloud


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
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 7 December 15, 2020 13:06
Where to define which fields to write? bgoeppner OpenFOAM 8 July 15, 2011 11:00
Write PDF from probes sampling and runtime plotting jose_rodrig OpenFOAM 4 June 5, 2011 06:30
no write option for ddt0 fields nikos_fb16 OpenFOAM Programming & Development 0 December 1, 2009 09:29
write nut fields in simpleFoam maurice OpenFOAM Running, Solving & CFD 5 March 23, 2009 01:57


All times are GMT -4. The time now is 18:27.