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

dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0); meaning

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jherb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2015, 11:14
Default dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0); meaning
  #1
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
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.
Saideep is offline   Reply With Quote

Old   May 18, 2015, 15:44
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
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);
and looking for dimensions() by https://github.com/OpenFOAM/OpenFOAM...3A.H&type=Code

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³)
Saideep likes this.
jherb 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
Problem with airfoil shape optimization robyTKD SU2 Shape Design 7 March 7, 2022 16:18
SU2 AOA optimization 454514566@qq.com SU2 9 March 7, 2022 16:17
DieselFoam spray thumthae OpenFOAM Running, Solving & CFD 98 December 24, 2014 15:55
2D FFD Optimization RLangtry SU2 2 August 5, 2014 09:48
Problem with restart solution in shape_optimization.py robyTKD SU2 Shape Design 21 May 29, 2013 09:26


All times are GMT -4. The time now is 03:37.