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

get dimensionless field values of a geometric field

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By superkelle

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2020, 09:34
Default get dimensionless field values of a geometric field
  #1
Member
 
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 6
superkelle is on a distinguished road
I wish to use a approximation for a coefficient "Rstabilisation" that is dependent on a dimension variable/field " nElectron" in my whole simulated region. The value of nElectron is in the "log" what is a transcendent function and only accepts dimensionless values. I worked around by defining a new dimensionless field nElectronDimless.

Code:
volScalarField nElectronDimless = nElectron;
nElectronDimless.dimensions().reset(dimless);

volScalarField RStabilisation = RDefault*exp(-stabParamR*log(nElectronDimless));
Is there a nicer way to implement that? I tried something like:

Code:
volScalarField RStabilisation = RDefault*exp(-stabParamR*log(nElectron.field());
...
volScalarField RStabilisation = RDefault*exp(-stabParamR*log(nElectron.value());
but those did not work.
superkelle is offline   Reply With Quote

Old   April 9, 2020, 08:08
Default
  #2
Member
 
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 6
superkelle is on a distinguished road
When someone is interested, now I work with and I define RStabilisation with its dimensions in "createFields"

Code:
RStabilisation.field() = RDefault.value()*exp(-stabParamR*log(nElectron.field()));
some similar threads for those kind of dimension problems:

volScalarField to power of constant

how to convert to dimensionless scalar in openfoam
ruloz and Adriana Correia like this.
superkelle is offline   Reply With Quote

Old   November 26, 2020, 05:28
Default
  #3
New Member
 
Adriana Ferreira
Join Date: Sep 2018
Posts: 6
Rep Power: 8
Adriana Correia is on a distinguished road
I had the some problem using tanh and it worked with your solution! Thanks a lot
Adriana Correia 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
Field values at the boundary cells vcvedant OpenFOAM Running, Solving & CFD 4 August 2, 2017 18:50
using chemkin JMDag2004 OpenFOAM Pre-Processing 2 March 8, 2016 23:38
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
How to input Magnetic Field values in ESTER Code? Amit Gupta Phoenics 0 September 21, 2006 14:38


All times are GMT -4. The time now is 09:29.