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

Implementation of sigmoid function

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 15, 2020, 06:03
Default Implementation of sigmoid function
  #1
New Member
 
Join Date: May 2020
Location: India
Posts: 4
Rep Power: 5
Action.Kamen is on a distinguished road
Hello Foamers ,


I am trying to implement sigmoid function in OpenFOAM-v1912 using

Foam::exp() and Foam::pow().



Code:
volScalarField tmpVar = nGAGR*scalar(-1) + averageGAR;
Code:
sigmoidGAGR=Foam::pow((1+Foam::exp(tmpVar)),-1);





here nGAGR and averageGAGR both are dimensionless volScalarField. But the code wont work and stops at the second line.


What am I doing wrong here, or is there any other way to implement sigmoid function.
Action.Kamen is offline   Reply With Quote

 

Tags
foam::exp, foam::pow, scalar, sigmoid, volscalarfield


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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23


All times are GMT -4. The time now is 15:46.