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

- - **How to solve this kind of continuity equation?**
(*http://www.cfd-online.com/Forums/openfoam-programming-development/90363-how-solve-kind-continuity-equation.html*)

How to solve this kind of continuity equation?Hi, I am a beginner of OpenFOAM. I try to use it to solve an equation in the mathematical form of:
div [sinh(|grad(phi)|)*div(phi)/|grad(phi)|] = 0 where phi is a volScalarField, |grad(phi)| is the magnitude of grad(phi), and sinh is the hyperbolic sine. I wrote the following codes, but it does not work. volVectorField GradPhi=fvc::grad(phi); surfaceScalarField MagGradPhi=mesh.Sf()*fvc::snGrad(phi); surfaceScalarField SinhMagGradPhi=sinh(MagGradPhi)/MagGradPhi; solve ( fvm::div(SinhMagGradPhi, GradPhi) ); The error is: conversion from ‘Foam::tmp<Foam::GeometricField<Foam::Vector<doubl e>, Foam::fvsPatchField, Foam::surfaceMesh> >’ to non-scalar type ‘Foam::surfaceScalarField’ requested I don’t understand this problem. Do you know how to solve above equation? Any opinion is welcome! Thanks! |

All times are GMT -4. The time now is 16:03. |