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

dividing a dimensioned vectorfield by a dimensioned scalar

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tobi

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 8, 2021, 07:58
Default dividing a dimensioned vectorfield by a dimensioned scalar
  #1
New Member
 
Wiebke Scholz
Join Date: Feb 2021
Posts: 2
Rep Power: 0
weikou is on a distinguished road
Hi,



I am aiming to write a chemistry-solver (I am still with OpenFoam v4.1) , that is solving the reaction and scalar transport on a (RANS averaged turbulent) incompressible flow field, that is already in steady state.

Therefore I need to solve the YEqn only, but adjust it by giving it a reaction source term.

Since I am working with incompressible flow, the dimensions of the terms are all in s⁻¹.

But dimension of reaction->R(Yi) is in kgm⁻³s⁻¹.



Therefore I would like to calculate


volScalarField& reactionRate = (reaction->R(Yi)) / rhoRef;


with 'rhoRef' being a scalar with dimensions kgm⁻³ to end up with reactionRate in dimension s⁻¹.

But when I try, it doesn't compile and gives me the error


no match for ‘operator/’ (operand types are ‘Foam::tmp<Foam::fvMatrix<double> >’ and ‘Foam::dimensionedScalar {aka Foam::dimensioned<double>}’)

Because I didn't find a lot of information on this in the OpenFOAM programmers' guide, I naively thought, this should work, but it seems like I was wrong. Maybe you have an idea, on how to fix this?


Thanks already in advance!
Wiebke
weikou is offline   Reply With Quote

 

Tags
dimensioned scalars, dimensioned vectorfields, incompressible flow, reaction


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
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 6 February 18, 2017 05:57
Issue symmetryPlane 2.5d extruded airfoil simulation 281419 OpenFOAM Running, Solving & CFD 5 November 28, 2015 13:09
Diverging solution in transonicMRFDyMFoam tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 06:20
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47


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