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

A data format error about fvc::div(surfaceScalarField,volVectorField)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2021, 05:09
Default A data format error about fvc::div(surfaceScalarField,volVectorField)
  #1
New Member
 
Join Date: Aug 2020
Posts: 7
Rep Power: 5
Heno is on a distinguished road
Hi foamers,
I use the OpenFOAM 4.0. I want to caculate the divergence of heat flux multiply temperature gradient. So I definite the gradient of T and heat flux imitating velocity U and phi in my createfield.H by

volVectorField gradT(fvc::grad(T));

surfaceScalarField phigradT(linearInterpolate(k*gradT) & Mesh.Sf());

And the solve equation is

fvScalarMatrix SEqn
(
fvm::ddt(rhoFuel, S)
+ fvm::div(phiFuel, S)
+ fvc::div(phigradT, gradT)
)
S is entropy and volScalarField.

But when I compile my code, the message is

error: no match for ‘operator-’ (operand types are ‘Foam::tmp<Foam::fvMatrix<double> >’ and ‘Foam::tmp<Foam::GeometricField<Foam::Vector<doubl e>, Foam::fvPatchField, Foam::volMesh> >’)
- fvc::div(phigradT, gradT)
^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/zero.H:101:0,
from /opt/openfoam4/src/OpenFOAM/lnInclude/UList.H:49,
from /opt/openfoam4/src/OpenFOAM/lnInclude/List.H:43,
from /opt/openfoam4/src/OpenFOAM/lnInclude/labelList.H:48,
from /opt/openfoam4/src/OpenFOAM/lnInclude/UPstream.H:42,
from /opt/openfoam4/src/OpenFOAM/lnInclude/Pstream.H:42,
from /opt/openfoam4/src/OpenFOAM/lnInclude/parRun.H:35,
from /opt/openfoam4/src/finiteVolume/lnInclude/fvCFD.H:4,


I don’t know how to set the gradient and the format of the surface flux is correct.
Heno is offline   Reply With Quote

Old   June 15, 2021, 07:56
Default
  #2
Senior Member
 
Yogesh Bapat
Join Date: Oct 2010
Posts: 102
Rep Power: 15
ybapat is on a distinguished road
You can check diffusion term implementation is some other solver.

-Yogesh
ybapat 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
Automatic Data Export (ascii format) A Kourm FLUENT 4 March 7, 2021 14:08
[General] Paraview data format conversion from vtk to parallel prog data format. odho ParaView 0 September 20, 2016 07:01
Write data from probe locations in binary format kozden OpenFOAM Post-Processing 0 June 18, 2016 05:25
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52
Smallest binary file format to save large data Zonexo Main CFD Forum 2 June 2, 2008 20:25


All times are GMT -4. The time now is 14:23.