|
[Sponsors] |
A data format error about fvc::div(surfaceScalarField,volVectorField) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 14, 2021, 05:09 |
A data format error about fvc::div(surfaceScalarField,volVectorField)
|
#1 |
New Member
Join Date: Aug 2020
Posts: 7
Rep Power: 5 |
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. |
|
June 15, 2021, 07:56 |
|
#2 |
Senior Member
Yogesh Bapat
Join Date: Oct 2010
Posts: 102
Rep Power: 15 |
You can check diffusion term implementation is some other solver.
-Yogesh |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |