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

Time units OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 15, 2019, 18:26
Default Time units OpenFOAM
  #1
New Member
 
Álvaro Pardo
Join Date: May 2018
Posts: 9
Rep Power: 3
pardoa is on a distinguished road
Hello everyone,

I have a very simple question to ask you all: the time units on OpenFOAM must be always in seconds? The OF User Guide states that the model can be used for any system of units, however I don't know if those units have to be always the base ones, as specified in the Guide for the IS and the USCS.

I would like to define the time control parameters in days or hours, so I need to know if it's indeed possible to do so rather than having to do it in seconds.

Thank you so much in advance!

Álvaro

Last edited by pardoa; August 16, 2019 at 11:20.
pardoa is offline   Reply With Quote

Old   August 16, 2019, 01:24
Default
  #2
New Member
 
Adam
Join Date: Nov 2018
Posts: 29
Rep Power: 2
Adam_K is on a distinguished road
You can use whatever you want for the units. The input data just needs to be correct for the chosen set of units. Keep in mind that OpenFOAM uses some dimensioned physical constants in some cases.
Adam_K is offline   Reply With Quote

Old   August 16, 2019, 02:47
Default
  #3
Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 54
Rep Power: 5
Gerry Kan is on a distinguished road
Hi Álvaro:

Yes, OpenFOAM uses "dimensioned" scalars and vectors but these are restricted to basic SI units, i.e., kg, m, s, K, mol, A, and Cd (candela). I don't think you can change that.

I imagine you are interested in displaying these units in hours and days. The no-code solution is conversion, but if you want a more user friendly solution, I am afraid you will have to create your own solver for that.

Another issue concerns the postprocessed results. So far they will be sorted by the time elapsed in seconds. I don't know how much work it is to convert them to the time units you desire. Maybe (in Linux) a link (ln -s) from the original folders (in seconds) to new names (in hours / days), for which you can write a script to automate, would suffice?

Hope that helps, Gerry.
Gerry Kan is offline   Reply With Quote

Old   August 16, 2019, 12:55
Default
  #4
New Member
 
Álvaro Pardo
Join Date: May 2018
Posts: 9
Rep Power: 3
pardoa is on a distinguished road
Hello!

Thanks for the answers and help .

As far as I understand, the units that are used in the model are preset to the base/basic units of the International System (IS). Nevertheless, any other system of units should be object of application on OpenFOAM after modifying the chosen set of units and dimensioned physical constant values in the DimensionSets and DimensionedConstants subdictionaries of the main controlDict file of the OpenFOAM installation ($WM_PROJECT_DIR/etc/controlDict).

Therefore, since I aim to define all my time control parameters in days or hours, I should modify the scalar value of the basic unit "s" (seconds) to 3600 if my input data is in hours and to 86400 if it's in days. Likewise, all constants whose dimension set includes a temporal unit should be changed accordingly.

Does this approach sound reasonable for you? Thanks!

Álvaro
pardoa is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 14:24
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07


All times are GMT -4. The time now is 19:35.