- **OpenFOAM Programming & Development**
(*https://www.cfd-online.com/Forums/openfoam-programming-development/*)

- - **Solve div(c1*phi)?**
(*https://www.cfd-online.com/Forums/openfoam-programming-development/98298-solve-div-c1-phi.html*)

Solve div(c1*phi)?I wanted to solve the following equation for T in OF. T is a scalar quantity.
div(c1*grad(T)) + div(c2*T) = div(c3) This equation is expressed as the OF language: fvm::laplacian(c1, T) + fvm::div(c2*T) == fvc::div(c3) There is an compilation error on div(c2*T). Does OpenFOAM cover only two type of divergence terms: div(phi, T) and div(T)? How can I deal with div(coeff*T)??? Thanks in advance for your comments. |

Hi!
First of all let's make sure I understand your problem: you want to solve a transport equation for a scalar field T with a diffusive term and a source term, right? If so, c1 must be a scalar, but c2 and c3 must be vectors, otherwise you are trying to calculate the divergence of a scalar, which doesn't exisit. Let's assume c2 is the vector transporting T, then this is a convection term that, if I'm not wrong, can be modeled in OpenFOAM with fvm::div(c2,T). |

All times are GMT -4. The time now is 01:06. |