|
[Sponsors] |
dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0); meaning |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 18, 2015, 12:14 |
dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0); meaning
|
#1 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Dear Foamers;
I was trying to figure this out but failed to understand the following line, dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0); The above line of code is from interFOAMs correctPhi. We create a variable name rAUf referring to the diagonal elements of the Navier Stokes Equation at face centres. Questions: 1. What does, dimTime/rho.dimensions() mean? 2. What does the third argument of integer 1.0 passed to the rAUf variable mean? Thanks for your patience and time. |
|
May 18, 2015, 16:44 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
You can use the search feature of github to search in the OpenFOAM repository. So looking for dimension dimTime results in:
https://github.com/OpenFOAM/OpenFOAM...C%93&q=dimTime with this first result: https://github.com/OpenFOAM/OpenFOAM...ionSets.C#L177 Code:
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0); so the method dimensions() is defined (probably also elsewhere): https://github.com/OpenFOAM/OpenFOAM...3A.H&type=Code which returns the dimension of a dimensioned field. I do not know which solver you use, but here is an example of the definition of the rho (density) field: https://github.com/OpenFOAM/OpenFOAM...ateFields.H#L7 Again searching for rhothermo leads to this file: https://github.com/OpenFOAM/OpenFOAM...hoThermo.C#L53 and finally looking for dimDensity: https://github.com/OpenFOAM/OpenFOAM...ionSets.C#L190 dimMass and dimVolume can be searched also: https://github.com/OpenFOAM/OpenFOAM...ionSets.C#L175 https://github.com/OpenFOAM/OpenFOAM...ionSets.C#L184 (dimLength is defined also in this file). So at the end you define a scalar with dimensions s/(kg/m³) and set it the the value 1 s/(kg/m³) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with airfoil shape optimization | robyTKD | SU2 Shape Design | 7 | March 7, 2022 17:18 |
SU2 AOA optimization | 454514566@qq.com | SU2 | 9 | March 7, 2022 17:17 |
DieselFoam spray | thumthae | OpenFOAM Running, Solving & CFD | 98 | December 24, 2014 16:55 |
2D FFD Optimization | RLangtry | SU2 | 2 | August 5, 2014 10:48 |
Problem with restart solution in shape_optimization.py | robyTKD | SU2 Shape Design | 21 | May 29, 2013 10:26 |