CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Alt to funkySetFields, setFields OF - setExpS _ setExpV (https://www.cfd-online.com/Forums/openfoam/238626-alt-funkysetfields-setfields-setexps-_-setexpv.html)

Fluidentity13 September 23, 2021 02:42

Alt to funkySetFields, setFields OF - setExpS _ setExpV
 
./setExpS ./setExpV
Alt for funkySetFields-swak4Foam with easy setup for setting initial Scalar or Vector fields using a math expression.

https://github.com/Fluidentity/setExpS_V


C++ program to set initial fields of an OpenFOAM scalar or
vector using a math-expression, taking co-ordinates as
parameter. The expressions are based off of exprtk library
by Arash Partrow. Check the link beneath for more info.
readme.txt file describess expression syntax and involves
exhaustive mathematical manipulation.
https://github.com/ArashPartow/exprtk

This is an alternative to funkySetFields {swak4Foam) or
setFields, for those who couldn't get them to work on their
OpenFoam version.
I couldn't get it to work on OF-8, but I won't take credit
away from multiple versions & environments it's working on
already. Minimum effort on getting it to work .
Simple Scalar Vector Formulation.
Make good use of this quick fix.

-------------------------------------------------------------

An exemplary testCase folder for scalarTransportFoam can
be found in the repository, with custom ./Allclean & ./Allrun
scripts.


All times are GMT -4. The time now is 22:34.