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

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2020, 06:54
Default Cannot use erfc() or erf() in setExprFieldsDict expression
  #1
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
Hello,

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.



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

Old   July 1, 2020, 08:26
Default
  #2
HPE
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, 12:25
Default
  #3
New Member
 
Jakub
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

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
Outlet boundary condition in interFoam Andrea_85 OpenFOAM Running, Solving & CFD 51 July 20, 2017 13:31
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 06:16
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
Lift, Drag Vs time chart,calculations Jamesd69climber CFX 8 February 17, 2005 17:23


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