CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Custom Scalar Transport Error Wrong Type

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   January 5, 2015, 15:42
Default Custom Scalar Transport Error Wrong Type
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 38
Rep Power: 4
jameswilson620 is on a distinguished road
Hell all!

Id like to construct a scalar transport equation that contains the components of fvm::div(phi,someScalar) manually.

e.g. fvm::div(phi,someScalar) = someScalar*fvc::div(U) + U&fvm::grad(someScalar)

How can I be sure someScalar in the term someScalar*fvc::div(U) is treated as an unknown and not explicitly as the previous term?

I was also wondering about the units of fvm::div(phi,someScalar).

ddt[1/s](someScalar[1]) != div[1/m](phi[m^3/s] * someScalar[1])

[1/s] != [m^2/s]

What am I missing?

Here is my equation:

fvScalarMatrix someScalarEqn 
fvm::ddt(someScalar) + someScalar*fvc::div(U) + U&fvm::grad(someScalar)
I also get the error:
genericAlphaEqn.H:3:53: error: no match for ‘operator+’ in ‘Foam:perator+(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >&) [with Type = double]((*(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator*(const Foam::GeometricField<double, PatchField, GeoMesh>&, const Foam::tmp<Foam::GeometricField<double, PatchField, GeoMesh> >&) [with PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]((*(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::fvc::div(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>, typename Foam::innerProduct<Foam::Vector<double>, Type>::type = double]())))))) + U’

Note, that I use fvm::div(phi,someScalar) everything works fine and the scalar field is advected with the known velocity U (though it isnt pretty ). This functionality would seem to imply that is the route I should choose; however, I want to solve this equation where the fvm::div(phi,someScalar) term is decomposed so that in the event of a divergent velocity field, I will be able to note the contribution of each term.

Thank you in advance, James
jameswilson620 is offline   Reply With Quote


divergence, error, inconsistent types, inner product, scalar transport

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with a barrier in a river faerber OpenFOAM Running, Solving & CFD 2 July 6, 2014 22:29
Simulation won't show turbulence pete_87 OpenFOAM Running, Solving & CFD 4 June 25, 2014 11:35
Divergent temperature in chtMultiRegion(Simple)Foam akrasemann OpenFOAM Running, Solving & CFD 13 March 24, 2014 03:54
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 11:25
pipe flow with heat transfer Fabian OpenFOAM 2 December 12, 2009 05:53

All times are GMT -4. The time now is 18:00.