CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Cannot use erfc() or erf() in setExprFieldsDict expression

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

LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2020, 07:54
Default Cannot use erfc() or erf() in setExprFieldsDict expression
New Member
Sai Manohar Ramachandran
Join Date: Jan 2016
Location: Trieste, TS, Italy
Posts: 1
Rep Power: 0
sramac3 is on a distinguished road
Send a message via Skype™ to sramac3

I am trying to do some stefan sucking interface validation using icoReactingMultiphaseInterFoam on v1912. I am trying to set up the initial temperature field at time=0.1. But the setExprFieldsDict doesn't allow me to use the erfc() or erf() functions. I can still use sqrt(), exp(), .... and other functions in the expression, but not the error function.

I get the following error,

"Object erfc does not exist or wrong type in expression at position"

Tsup + (Tsat-Tsup)*erfc(N)/erfc(l)
^^^^ near here

I also tried using a taylor series expansion for the error function (considered five terms), but the temperature set is wrong.

I am herewith attaching the setExprFieldsDict for your reference.

Any sort of help would be appreciated.

Attached Files
File Type: gz setExprFieldsDict.gz (730 Bytes, 6 views)
sramac3 is offline   Reply With Quote

Old   July 1, 2020, 09:26
Senior Member
HPE's Avatar
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
I haven't tried it, but: "std::erfc(x)" would help?
HPE is offline   Reply With Quote

Old   April 27, 2023, 13:25
New Member
Join Date: Aug 2022
Posts: 1
Rep Power: 0
jakvb is on a distinguished road
Were you able to solve this problem in the end? I'm also trying to use erf() in setExprFieldsDict
jakvb is offline   Reply With Quote


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlet boundary condition in interFoam Andrea_85 OpenFOAM Running, Solving & CFD 51 July 20, 2017 14:31
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 07:16
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 07:25
Lift, Drag Vs time chart,calculations Jamesd69climber CFX 8 February 17, 2005 18:23

All times are GMT -4. The time now is 10:02.