ENH: improve dimensions handling for setExpr* utilities (#2014)

- new '-ascii' option to write in ASCII format instead of the
  controlDict setting. This can be useful when generating fields that
  should be parsed with other tools, or for visual inspection.

- correct mismatch of option names and lookups
This commit is contained in:
Mark Olesen
2021-03-18 11:53:42 +01:00
parent cd1350a87f
commit 1ca99a2c94
4 changed files with 92 additions and 44 deletions

View File

@ -25,7 +25,7 @@ updateBCs
{
target value;
variables ( "rho=1.2" );
expression #{ 0.5*rho*cbrt(mag(U)) #};
expression #{ 0.5*rho*pow(mag(U),3) #};
}
expressions

View File

@ -20,7 +20,8 @@ readFields ( U );
_value1
{
variables ( "rho=1.2" );
expression #{ 0.5*rho*cbrt(mag(U)) #};
expression #{ 0.5*rho*pow(mag(U),3) #};
dimensions [ kg s^-3 ];
}
expressions