|
[Sponsors] |
Accessing thermoPhysical Property Functions - e.g. mixture_.rho(scalar p, scalar T) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 23, 2015, 01:32 |
Accessing thermoPhysical Property Functions - e.g. mixture_.rho(scalar p, scalar T)
|
#1 |
New Member
Will Logie
Join Date: Sep 2010
Location: ANU, Canberra, Australia
Posts: 21
Rep Power: 16 |
I am looking to post-process buoyantPimpleFoam (perfectGas rho, Sutherland mu, JANAF Cp) results and extract some heat transfer characteristics for a wall [patchi] based on the Rayleigh Number:
Code:
Ra.boundaryField()[patchi] = ( gravity * betaFilm.value() / ( muFilm.value() / rhoFilm.value() * alphaFilm.value() ) ) * (T.boundaryField()[patchi] - T_ref.value()) * pow(L.value(), 3); Has anyone done this before or can give me some tips; for example, how best to access the member function: Code:
template<class Specie> inline Foam::scalar Foam::perfectGas<Specie>::rho(scalar p, scalar T) const { return p/(this->R()*T); } My awareness of C++ is insufficient. Thank you, Will. |
|
June 23, 2015, 06:35 |
|
#2 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
You need to get access to the thermo object which is used in the solver.
In the solver this is very simple, it's usually stored in a variable called thermo or something similar. Read your solver code for this. In a different program you need to instantiate it the same way as it's done in the solver first. |
|
June 24, 2015, 00:38 |
|
#3 |
New Member
Will Logie
Join Date: Sep 2010
Location: ANU, Canberra, Australia
Posts: 21
Rep Power: 16 |
I'm aware that I can access any [celli] within the simulated thermo variable field which in turn is calculated from the pressure and temperature of that particular cell.
But what I am asking is how does one "calculate" one's own viscosity or density given some "reference" or desired pressure and temperature? For example if I know my film temperature to be 467K at atmospheric pressure, I could calculated film values for density, viscosity and specific heat by way of the respective member functions - I imagine to look like rhoFilm = perfectGas.rho(1e5, 467) Are you implying I could use thermo.rho() in this way, and if so how? |
|
Tags |
janaf, memberfunctions, perfectgas, sutherland |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[openSmoke] libOpenSMOKE | Tobi | OpenFOAM Community Contributions | 562 | January 25, 2023 10:21 |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 08:15 |
dieselFoam problem!! trying to introduce a new heat transfer model | vivek070176 | OpenFOAM Programming & Development | 10 | December 24, 2014 00:48 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |
accessing thermophysical properties on a lower level | romant | OpenFOAM Programming & Development | 4 | October 28, 2013 09:25 |