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

Excel like goal-seek type functionality in OpenFOAM

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 30, 2010, 16: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: 10
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, 16:40
Default
  #2
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 10
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, 16:46
Default Root finding
  #3
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 538
Rep Power: 18
chegdan 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, 16:50
Default
  #4
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 10
benk is on a distinguished road
Interesting, I'll take a look at that. Thanks.
benk is offline   Reply With Quote

Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
boundary conditions for simpleFoam calculation foam_noob OpenFOAM Running, Solving & CFD 8 July 1, 2015 08:07
Fluent3DMeshToFoam simvun OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 May 14, 2012 05:20
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 9 June 22, 2011 18:59
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 15:01.