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

fvMatrix to volScalarField coversion ?

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

Like Tree3Likes
  • 3 Post By japaf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2015, 20:14
Unhappy fvMatrix to volScalarField coversion ?
  #1
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 14
lfgmarc is on a distinguished road
Send a message via MSN to lfgmarc
Hi everybody,

I'm try to use the combustion model class of openfoam, it has a member function that returns the source therm for species equations (Reaction rate):

virtual tmp<fvScalarMatrix> R(volScalarField& Y) const = 0;


If I understand well, this funcion is overloaded with the calculation way provided by reaction model for R that is selected at runtime. it function returns a fvScalarMatrix. My question is if I want to define a new volScalarfield, for example, Rates, It is possible to utilices this fvScalarMatrix and define a volScalarField , exists any form to make this conversion ?

Any advice will be graatly appreciated, thanks in advance


Felipe
__________________
Felipe G
lfgmarc is offline   Reply With Quote

Old   September 8, 2016, 10:04
Default
  #2
New Member
 
Xu Huang
Join Date: Apr 2015
Location: Netherlands
Posts: 23
Rep Power: 9
xuhuang is on a distinguished road
Hi Felipe,

I have the same problem. Have you succeed?

cheers,
Xu
xuhuang is offline   Reply With Quote

Old   September 8, 2016, 15:03
Default
  #3
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 272
Rep Power: 16
anishtain4 is on a distinguished road
Hi,

As you know the method is abstract and needs to be overloaded. But what you are trying to achieve is not clear to me. If you want a volScalarFeild, then you can just look for where R has been called and use the input argument of it. You already have that volScalarField (y), why convert it from R?
anishtain4 is offline   Reply With Quote

Old   March 21, 2019, 07:32
Default
  #4
New Member
 
Pavel Ferkl
Join Date: Mar 2014
Posts: 2
Rep Power: 0
japaf is on a distinguished road
You have to multiply by the respective field to get volScalarField from fvMatrix (check how it is used in Qdot function in singleStepCombustion.C). Basically, you need to do
Code:
Rates = R(Y) & Y;
Kummi, crubio.abujas and Mirza8 like this.
japaf is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 10:21
using chemkin JMDag2004 OpenFOAM Pre-Processing 2 March 8, 2016 23:38
the openfoam source term and fvmatrix problem wenxu OpenFOAM Programming & Development 0 September 5, 2014 11:56
make a dimensionedScalar to be volScalarField sharonyue OpenFOAM Programming & Development 4 April 2, 2014 06:44
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 07:16


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