|
[Sponsors] |
Excel like goal-seek type functionality in OpenFOAM |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 20 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 20 ![]() |
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).
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 ![]() ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 20 ![]() |
Interesting, I'll take a look at that. Thanks.
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Fluent3DMeshToFoam | simvun | OpenFOAM Meshing & Mesh Conversion | 50 | January 19, 2020 15:33 |
OpenFOAM - Validation of Results | Ahmed | OpenFOAM Running, Solving & CFD | 10 | May 13, 2018 18:28 |
boundary conditions for simpleFoam calculation | foam_noob | OpenFOAM Running, Solving & CFD | 8 | July 1, 2015 08:07 |
[Other] StarToFoam error | Kart | OpenFOAM Meshing & Mesh Conversion | 1 | February 4, 2010 04:38 |
Problems with Turbulence Modeling | ezsoal | OpenFOAM Running, Solving & CFD | 4 | November 26, 2009 15:12 |