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

Excel like goal-seek type functionality in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2010, 17:02
Default Excel like goal-seek type functionality in OpenFOAM
  #1
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
This is a long shot, but is there an excel like goal-seek functionality in OpenFoam?

In one of my custom made solvers I have a non-linear algebraic equation and I need to iterate for a value inside the equation, like:

Val = [exp(b*a) + exp(-c*a)]

I know everything except a, which I want to find.
benk is offline   Reply With Quote

Old   April 30, 2010, 17:40
Default
  #2
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
I guess I'm looking for a built in Newton's method in OpenFoam. It's fairly easy to implement actually (as long as the analytical derivative is known).
benk is offline   Reply With Quote

Old   April 30, 2010, 17:46
Default Root finding
  #3
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Openfoam has a root finding method that I have never used but noticed while looking around in the source. Take a look at:

/OpenFOAM/OpenFOAM-1.5-dev/src/ODE/findRoot/BisectionRoot
and
/OpenFOAM/OpenFOAM-1.5-dev/src/ODE/findRoot/RiddersRoot

of course this is in your particular version, mine being the 1.5-dev type. You could also do some sort of newton-raphson type root finding or many others that are in the Numerical recipes books with:

lhs-rhs=0 and find the root of your function of a.

Hope this helps.

Dan
chegdan is offline   Reply With Quote

Old   April 30, 2010, 17:50
Default
  #4
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Interesting, I'll take a look at that. Thanks.
benk 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
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 10 May 13, 2018 19:28
boundary conditions for simpleFoam calculation foam_noob OpenFOAM Running, Solving & CFD 8 July 1, 2015 09:07
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
Problems with Turbulence Modeling ezsoal OpenFOAM Running, Solving & CFD 4 November 26, 2009 16:12


All times are GMT -4. The time now is 21:48.