CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to convert from GeometricField to fvMatrix

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2009, 19:01
Default Hi everyone: i have faced a e
  #1
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 309
Rep Power: 18
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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
waynezw0618 is offline   Reply With Quote

Old   January 22, 2009, 12:12
Default by the way how about change it
  #2
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 309
Rep Power: 18
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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
waynezw0618 is offline   Reply With Quote

Old   January 8, 2021, 17:35
Default
  #3
Member
 
Nevada
Join Date: Apr 2014
Posts: 32
Rep Power: 12
razi.me05 is on a distinguished road
Hi,

Could you resolve this issue?
I have compressible fluid.

Thanks in advance!
razi.me05 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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