|
[Sponsors] |
June 5, 2008, 14:06 |
How to deal with source term numerically?
|
#1 |
Guest
Posts: n/a
|
Hello, everyone:
Is there any general method to deal source terms in PDE, such as du/dt+u*du/dx=f(u) where f(u) is very large at the inlet of a piper or f(u) is the chemical reaction terms. Thanks. |
|
June 6, 2008, 05:09 |
Re: How to deal with source term numerically?
|
#2 |
Guest
Posts: n/a
|
Hello,
Sure it has! But it's not quite general... You always have a lot of choices depending on your problem. How are you solving this(these) equation(s)? Are you coding yourself the solver? Do you use a software? Assuming you're using a finit volume approach, as you discretize your equations for the hole domain, you'll have a linear system like this: [A]*[u]=[B] Where [A] you have the coeficients that multiply u, [u] you have the solution and in be [B] you have the independent terms. Depending in the dependency between f(u) and u, you'll have to linearize that before solving the system - i.e. if you have f(u) = u^2, you'll have to treat like f(u)= u*u', where you know u' and are looking for u. And then probably you'll have a part of the source term that will be in [B] and a other part in [A], as the source term is not entirely dependent from u nor independent. I hope I could answer your question. As it's my first post, and I'm kind of new in CFD, I apologize for any mistakes in my explanation. Best regards, Victor |
|
June 6, 2008, 12:21 |
Re: How to deal with source term numerically?
|
#3 |
Guest
Posts: n/a
|
Your equation is nonlinear so the first thing to try is a Newton-type method. To do this, write the whole system of PDE as a single statement of the form
F(u) = 0 where in this case, F(u) = u_t + u u_x - f(u). Then take the functional derivative F'(u)(du) = (du)_t + u (du)_x + (du) u_x - f'(u)(du) which is linear in du. Now take an initial guess u and solve the linear system F'(u)(du) = -F(u) for du. Then update u = u + du and repeat until converged. If assembling the Jacobian matrix F'(u) is very expensive, then Jacobian-free Newton-Krylov methods (only a preconditioner for the Krylov iteration is actually formed) can be used. Also, various quasi-Newton methods can also work well although they generally don't have quadratic convergence. If the nonlinearity is very strong, a continuation may be needed. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
momentum source term | zwdi | FLUENT | 14 | June 27, 2017 15:40 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 01:24 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
How to deal with source term when using RKschemes? | leaf | Main CFD Forum | 2 | May 11, 2006 10:34 |