CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Implicit equation solving

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   December 9, 2004, 16:50
Default When I want to have a solver
Dr B.M. Smith (Smith)
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,
  Reply With Quote

Old   December 10, 2004, 06:20
Default The latter, you must separate
Mattijs Janssens (Mattijs)
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.

  Reply With Quote

Old   December 10, 2004, 06:36
Default Here as an example, is the mem
Eugene de Villiers (Eugene)
Posts: n/a
Here as an example, is the mementum predictor step from icoFoam:

fvVectorMatrix UEqn
+ 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)

  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Implicit solver for gamma volumefraction equation sek OpenFOAM Running, Solving & CFD 38 July 11, 2015 04: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 00:50
FEM pressure poisson equation (Implicit) cfd-beginner Main CFD Forum 0 August 9, 2005 13:32
I want help for solving the poisson equation Venkatesh Main CFD Forum 2 September 26, 2003 04:26

All times are GMT -4. The time now is 12:04.