CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   1D burgers equation - first order derivative (http://www.cfd-online.com/Forums/openfoam/98566-1d-burgers-equation-first-order-derivative.html)

doubtsincfd March 14, 2012 01:13

1D burgers equation - first order derivative
 
How can I implement the first order derivative in OF? For eg 1D burger's equation:

du/dt+u du/dx = nu d2u/dx2

akidess March 14, 2012 03:42

Does this work?

Code:

fvm::ddt(U)+U*fvm::grad(U)=fvm::laplacian(nu,U)


All times are GMT -4. The time now is 14:25.