|
[Sponsors] |
How to convert from GeometricField to fvMatrix |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 21, 2009, 19:01 |
Hi everyone:
i have faced a e
|
#1 |
Senior Member
|
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 ( fvc::grad(Tphi_) +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 |
|
January 22, 2009, 12:12 |
by the way how about change it
|
#2 |
Senior Member
|
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 |
|
January 8, 2021, 17:35 |
|
#3 |
Member
Nevada
Join Date: Apr 2014
Posts: 32
Rep Power: 12 |
Hi,
Could you resolve this issue? I have compressible fluid. Thanks in advance! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FvMatrix coefficients | shrina | OpenFOAM Running, Solving & CFD | 10 | October 3, 2013 15:38 |
Manipulation of cellvalue of a geometricField | ivan_cozza | OpenFOAM Running, Solving & CFD | 2 | September 25, 2008 14:58 |
Create GeometricField without IOobject | nadine | OpenFOAM Running, Solving & CFD | 3 | August 15, 2008 10:24 |
Duplicate GeometricField | reimund | OpenFOAM Running, Solving & CFD | 9 | June 9, 2008 14:47 |
Accessing data of geometricField | bird | OpenFOAM Running, Solving & CFD | 1 | August 28, 2007 19:21 |