CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Excel like goal-seek type functionality in OpenFOAM (

benk April 30, 2010 16:02

Excel like goal-seek type functionality in OpenFOAM
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 April 30, 2010 16:40

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).

chegdan April 30, 2010 16:46

Root finding
Openfoam has a root finding method that I have never used but noticed while looking around in the source. Take a look at:


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.


benk April 30, 2010 16:50

Interesting, I'll take a look at that. Thanks.

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