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

Adding Prandtl Number Calculation to buoyantSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2020, 11:00
Default Adding Prandtl Number Calculation to buoyantSimpleFoam
  #1
New Member
 
Tim Ruscoe
Join Date: Jul 2020
Posts: 1
Rep Power: 0
T_Rus-UK14 is on a distinguished road
Dear Foamers,

I'm running a simulation analysing natural circulation of molten salt using buoyantSimpleFoam. I'm trying to calculate the local Prandtl number across the fluid domain, in order to assess the thermal boundary layer. I have attempted this by modifying the solver.

First I added the following to createFields.H - example below is for Cp, mu and kappa were added in the same way:

volScalarField Cp0
(
IOobject
(
"Cp0",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.Cp()
);

and for Prandtl No:

volScalarField Pr0
(
IOobject
(
"Pr0",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Pr0",dimensionSet(0, 0, 0, 0, 0),0) //initial value of 0
);

Then inside the .C file for buoyantSimpleFoam I have added the equation for the Pr number just before runTime.write();

Pr0 = (Cp0*mu0)/kappa0;

This successfully outputs a file for the Prandtl number in my time directory, however it only outputs the value at the boundaries, and a uniform internal field.... What I am unable to work out, is how to output the Prandtl number as a non uniform field as per velocity / pressure / temperature etc. Attached is an example of the output for the Prandtl number. I am unclear how to write a volScalarField to the entire mesh as a non-uniform internal field, and where I should define this.


My guidance for editing the solver has largely been taken from these excellent slides:
https://drive.google.com/file/d/1KXz...NVSCEctGS/view

Any guidance or recommended material that would help is much appreciated! Or any recommendations of alternative methods to calculate a local prandtl number across the mesh are most welcome!


Best,


Tim
Attached Files
File Type: txt Pr0.txt (2.1 KB, 10 views)
T_Rus-UK14 is offline   Reply With Quote

Old   February 23, 2023, 05:37
Default
  #2
New Member
 
Perry
Join Date: Oct 2022
Posts: 2
Rep Power: 0
PerryTheEngineer is on a distinguished road
Hi,

Did you find a solution?

Thanks
PerryTheEngineer 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
decomposePar no field transfert Jeanp OpenFOAM Pre-Processing 3 June 18, 2022 12:01
GenerateVolumeMesh Error - Surface Wrapper Self Interacting (?) AndreP STAR-CCM+ 10 August 2, 2018 07:48
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 22:29
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
foam-extend_3.1 decompose and pyfoam warning shipman OpenFOAM 3 July 24, 2014 08:14


All times are GMT -4. The time now is 04:44.