|
[Sponsors] |
January 14, 2016, 12:17 |
Solve a non-differential equation
|
#1 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello
I have to solve an equation to get the turbulent Prandtl number in my case, where I have something like: where f is a complex formula, so I see a bit hard to get an analytical solution to get the turbulent Prandtl number. I am thinking to solve it by iterations (Newton method), but I would like to know if someone has alredy solved something similar in an equation environment. The problem of the Newton method is I have to get the turbulent Prandtl number in each cell (is a volScalarField). I will comment my advances |
|
January 14, 2016, 13:10 |
|
#2 |
Senior Member
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21 |
There are ODE solvers available that you can use for that purpose. Check out applications/test/ODE. You can compile the test with wmake and execute it like this:
Code:
Test-ODE Euler Code:
Test-ODE whaaat If you want to solve this for a field, my guess is that you need to perform root finding on a per-cell basis. That could be quite costly, depending on the function graph - for example if it has diminishing gradients, or there is no way to find a good starting point.
__________________
When asking a question, prepare a SSCCE. |
|
January 15, 2016, 12:23 |
|
#3 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello
thanks for your answer, tomislav_maric. I have checked the code and I have implemented the equation, but as you said and I supposed, it has a huge computational cost. I will check if there are other possibilites. Thanks for your help! |
|
January 18, 2016, 10:22 |
|
#4 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
It might be faster if you use the previous result as a starting point for the next iteration.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting the height of the stream in the free channel | kevinmccartin | CFX | 12 | October 13, 2022 22:43 |
solve the continuity equation | openfoammaofnepo | OpenFOAM | 0 | May 19, 2013 07:12 |
Descretization of momentum equation to solve Navier stokes equation by finite volume | manishsathe14 | Main CFD Forum | 2 | December 30, 2012 23:25 |
How to solve this ordinary differentiate equation | ztdep | Main CFD Forum | 3 | September 13, 2006 00:21 |
solving a differential equation with NEWTON.... | myway | Main CFD Forum | 0 | May 15, 2006 03:05 |