CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   How to write out a bubble diameter and lift force field (https://www.cfd-online.com/Forums/openfoam-programming-development/232214-how-write-out-bubble-diameter-lift-force-field.html)

localhost9527 December 4, 2020 08:06

How to write out a bubble diameter and lift force field
 
Hello Foamers,

This is my first time asking a question here, so please be patient with any mistakes.

System:
OpenFOAM 8
Ubuntu 20.04LTS

Problem-Statement:
I am trying to use multiphaseEulerFoam solver to solve a wall boiling problem.
The tutorials worked but I want more field information such as bubble diameter distribution, lift force distribution.
It seems that the solver does not write out there fields.
How can I write out these information?
thx!

ageorg January 17, 2021 16:18

Bubble diameter distribution
 
I am also after the same thing did you manage to find anything?

lumpor January 17, 2021 17:14

I am also quite new to openfoam and so I don't have any experience doing this myself, but I think you need to make a new solver based on multiPhaseEulerfoam and make a new solver where you add new IOobjects.



Something roughly like:
Code:

volScalarField bubbleDiameter
 
 (
 
    IOobject
 
    (
 
        "bubbleDiameter",
 
        runTime.timeName(),
 
        mesh,
 
        IOobject::NO_READ,
 
        IOobject::AUTO_WRITE
 
    ),
 
    mesh,
 
    dimensionedScalar(dimLength, zero)
 
 );

And then set it to the bubble diameter each iteration.



You can read how IOObjects work here.


You can look at the createFields.h files of different existing solvers to see how they did it.


Sorry if this wasn't what you were looking for.


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