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. |
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).
|
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:
/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 |
Interesting, I'll take a look at that. Thanks.
|
All times are GMT -4. The time now is 13:51. |