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

help in defining source for transport equation - NOOB

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2021, 13:11
Default help in defining source for transport equation - NOOB
  #1
New Member
 
Lollo
Join Date: Aug 2019
Posts: 4
Rep Power: 7
MarcDP is on a distinguished road
Hi I am a relative noob on programming the OF solver, I've looked many tutorials but I can't find the way to do some simple operations.

I am trying to modify the transport equation to include a source term that is proportional to the cell volume.

assuming:
- lambda is a dimensionedScalar
- T is a volScalarField

I'd like to modify the source term along these lines:

Code:
  fvScalarMatrix TEqn
            (
                fvm::ddt(T)
              + fvm::div(phi, T)
              - fvm::laplacian(DT, T)
              + fvm::Sp(lambda,(T*mesh.V()))

            );
However this result in the following error:

error: no matching function for call to ‘Sp(Foam::dimensionedScalar&, Foam::tmp<Foam:: DimensionedField<double, Foam::volMesh> >)’

I guess the multiplication result is not of the type that the fvm::Sp function expects.

If anybody could help it would be massive, thanks

Last edited by MarcDP; June 30, 2021 at 14:44.
MarcDP is offline   Reply With Quote

Reply

Tags
transport equation


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
Using PengRobinsonGas EoS with sprayFoam Jabo OpenFOAM Running, Solving & CFD 36 July 16, 2024 04:52
Source Term due to evaporation in energy transport equation styleworker OpenFOAM Programming & Development 3 September 7, 2022 04:09
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 14:14
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59


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