CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to convert from GeometricField to fvMatrix (https://www.cfd-online.com/Forums/openfoam-solving/58068-how-convert-geometricfield-fvmatrix.html)

 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

{

return

(

+scalar(2)*fvc::curl(Tpsi_)

);

}

and the Tphi and Tpsi is defined as :

volScalarField Tphi_;

volVectorField Tpsi_;

how can i resolve it?

thanks!

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::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.