|
[Sponsors] |
Adding Prandtl Number Calculation to buoyantSimpleFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 28, 2020, 11:00 |
Adding Prandtl Number Calculation to buoyantSimpleFoam
|
#1 |
New Member
Tim Ruscoe
Join Date: Jul 2020
Posts: 1
Rep Power: 0 |
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 |
|
February 23, 2023, 05:37 |
|
#2 |
New Member
Perry
Join Date: Oct 2022
Posts: 2
Rep Power: 0 |
Hi,
Did you find a solution? Thanks |
|
|
|
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 |