|
[Sponsors] |
December 9, 2004, 16:50 |
When I want to have a solver
|
#1 |
Guest
Posts: n/a
|
When I want to have a solver that must solve for a vector implicitly defined, but which can be written explicitly by matrix inversion, is this possible? Can I write an implicit equation and request foam to solve for a particular vector field within the equation? Or rather must one write all equations to be solved in explicit form, and if so, when using the expression "inv(M)" to invert a matrix M, if M is a complicated sum of products of tensors, say "M=A+div(nu, U)" for example, can one write combined expressions as equation terms such as "inv(A+div(nu, U))", or must one separate such operations by first solving the field eqn for M on the mesh and then later solve the eqn involving the inverse? (I'd like to get some hints before committing to writing solver before I commit to trial and error testing.)
Thanks in advance for any help, Blair. |
|
December 10, 2004, 06:20 |
The latter, you must separate
|
#2 |
Guest
Posts: n/a
|
The latter, you must separate the operations. You create an equation for a single variable (can be a vector or tensor) using explicit terms (e.g. fvc::div) or implicit terms (e.g. fvm::laplacian) where the implicitness is only in the variable solved for. You can then call 'solve' on it which does your 'inv'.
Have a look at a simple solver, e.g. icoFoam ($FOAM_SOLVERS/incompressible/icoFoam/icoFoam/C) Hope this answers some of your questions. Mattijs |
|
December 10, 2004, 06:36 |
Here as an example, is the mem
|
#3 |
Guest
Posts: n/a
|
Here as an example, is the mementum predictor step from icoFoam:
fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) ); solve(UEqn == -fvc::grad(p)); As Mattijs said the elements prefaced by fvm are implicit terms in the Ueqn matrix, while the fvc term will be treated explicitly by the solver. (U = velocity, phi = face flux, nu = viscosity, p = pressure) Eugene |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implicit solver for gamma volumefraction equation | sek | OpenFOAM Running, Solving & CFD | 38 | July 11, 2015 05:59 |
Euler Equation Implicit Upwind Schemes | felixrieper | OpenFOAM Running, Solving & CFD | 1 | February 9, 2014 01:58 |
Solving point implicit schemes in openFoam | srinath | OpenFOAM | 2 | October 13, 2008 01:50 |
FEM pressure poisson equation (Implicit) | cfd-beginner | Main CFD Forum | 0 | August 9, 2005 14:32 |
I want help for solving the poisson equation | Venkatesh | Main CFD Forum | 2 | September 26, 2003 05:26 |