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

Integrating rhoReactionThermo in twoPhaseModel

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 4, 2022, 11:50
Default Integrating rhoReactionThermo in twoPhaseModel
  #1
Member
 
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4
überschwupper is on a distinguished road
Dear Foamers!


I need some help. I'm currently building a multiphase class (pretty similar to that in compressibleInterFoam https://github.com/OpenFOAM/OpenFOAM...ixtureThermo.H) but instead of rhoThermo, I need rhoReactionThermo for the multicomponent feature + reaction models in OF. Thats why I inherited the composite sub class .


Code:
class twoPhaseReactionThermo
:
public rhoReactionThermo::composite,
public twoPhaseMixture,
public interfaceProperties
Unfortunately I always get the error message, that I cant create an object of pure abstract type and thats because of the function that gets inhereted from fluidReactionThermo:



Code:
virtual basicSpecieMixture& composition() = 0;
Can someone explain to me why making a reference to an object managed by autoPtr is working fine, for exampe in reactingFoam, altough this function is pure inside that class

Code:
basicSpecieMixture& composition = thermo.composition();
And can someone please explain to me how I get away with that? I mean that function has literally no function, since I have two different phases that has different components inside. Í thought about recompiling that class without that function but then I loose the option of calling it from the thermos managed by autoPtr


Code:
*.H

autoPtr<rhoReactionThermo> thermo1_;
autoPtr<rhoReactionThermo> thermo2_;


*.C
thermo1_= rhoReactionThermo::New(U.mesh(), phase1Name_);
thermo2_= rhoReactionThermo::New(U.mesh(), phase2Name_);


basicSpecieMixture& composition1()
{ return thermo1_->composition(); }
basicSpecieMixture& composition2()
{ return thermo2_->composition(); }


Or should I just delete the inheritance from rhoReactionThermo::composite and access everything just from thermo1 and thermo2?




Big thanks to anyone in advance and have a nice week!

Last edited by überschwupper; July 6, 2022 at 10:22.
überschwupper is offline   Reply With Quote

 


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
How to obtain the force by integrating the pressure? Rinia STAR-CCM+ 1 June 30, 2019 22:13
New rhoReactionThermo type in reactingTwoPhaseEulerFoam cfd4res OpenFOAM Programming & Development 0 June 3, 2019 06:32
integrating cantera with openfoam khalifa CFD Freelancers 1 October 19, 2015 21:36
Integrating velocity profile over a line umar82088 OpenFOAM Post-Processing 0 June 10, 2013 13:58
a short online survey about integrating CFD Question 2 Main CFD Forum 0 September 19, 2006 15:12


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