CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to convert from GeometricField to fvMatrix (

waynezw0618 January 21, 2009 19:01

Hi everyone: i have faced a e
Hi everyone:
i have faced a error message in OF1.5 as :
Potentialke/Potentialke.C:384: error: conversion from 'Foam::tmp<foam::geometricfield<foam::vector<doubl e>, Foam::fvPatchField, Foam::volMesh> >' to non-scalar type 'Foam::tmp<foam::fvmatrix<foam::vector<double> > >' requested

and in line 384 of Potentialke.C,i have the code :

tmp<fvvectormatrix> Potentialke::divR() const








and the Tphi and Tpsi is defined as :

volScalarField Tphi_;

volVectorField Tpsi_;

how can i resolve it?


yours wayne

waynezw0618 January 22, 2009 12:12

by the way how about change it
by the way how about change it to:
tmp<fvvectormatrix> Potentialke::divR(U) const


return (
fvm::div(phi_, U)
- fvm::Sp(fvc::div(phi_), U)
+ fvc::grad(Tphi_)
+ fvc::curl(Tpsi_)


because i think the first two term :
fvm::div(phi_, U)
- fvm::Sp(fvc::div(phi_), U)
will resulting div(U),which should be zero for incompressible flow?

can anyone help me ?

yours wayne

All times are GMT -4. The time now is 17:15.