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

Combining interFoam and reactingParcelFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2019, 01:28
Default Combining interFoam and reactingParcelFoam
  #1
New Member
 
Chris
Join Date: Apr 2019
Posts: 9
Rep Power: 7
chw68014 is on a distinguished road
Hello, I'm trying to combine the parcel tracking and heat transfer elements of reactingParcelFoam into interFoam. I've started by including the necessary header files/folds from reactingParcelFoam in interFoam and then tried to only introduce parcels to interFoam.

My first three steps to introduce parcels were as follows:

1) Add "parcels.evolve()" to interFoam within the time loop as such (in bold):


while (runTime.run())
{
#include "readDyMControls.H"

if (LTS)
{
#include "setRDeltaT.H"
}
else
{
#include "CourantNo.H"
#include "alphaCourantNo.H"
#include "setDeltaT.H"
}

++runTime;

Info<< "Time = " << runTime.timeName() << nl << endl;

/*Addition of command to add parcels from reactingParcelFoam*/
parcels.evolve();


2) Then I included createClouds.H from reactingParcelFoam in my interFoam solver folder and included createClouds.H in interFoam's createFields.H as such (in bold):


#include "createMRF.H"
#include "createClouds.H"
#include "createFvOptions.H"


3) Then, because I'm trying to keep interFoam incompressible (without implementing the incompressibility of reactingParcelFoam), I tried to remove slgThermo from createClouds.H as such since everything I've seen suggests that slgThermo is used to implement thermal properties with varying pressure:


Info<< "\nConstructing reacting cloud" << endl;
basicReactingMultiphaseCloud parcels
(
"reactingCloud1",
rho,
U,
g/*,
slgThermo*/
);


However, I'm receiving the following errors:


1)
In file included from ../interReactingParcelFoam_chw/createFields.H:140:0,
from /home/chw119/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/postProcess.H:131,
from interReactingParcelFoam_chw.C:74:
../interReactingParcelFoam_chw/createClouds.H: In function ‘int main(int, char**)’:
../interReactingParcelFoam_chw/createClouds.H:9:1: error: no matching function for call to ‘Foam::ReactingMultiphaseCloud<Foam::ReactingCloud <Foam::ThermoCloud<Foam::KinematicCloud<Foam::Clou d<Foam::ReactingMultiphaseParcel<Foam::ReactingPar cel<Foam::ThermoParcel<Foam::KinematicParcel<Foam: article> > > > > > > > >::ReactingMultiphaseCloud(const char [15], Foam::volScalarField&, Foam::volVectorField&, const Foam::meshObjects::gravity&)’
);
^


2)
In file included from createFields.H:140:0,
from interReactingParcelFoam_chw.C:82:
createClouds.H:9:1: error: no matching function for call to ‘Foam::ReactingMultiphaseCloud<Foam::ReactingCloud <Foam::ThermoCloud<Foam::KinematicCloud<Foam::Clou d<Foam::ReactingMultiphaseParcel<Foam::ReactingPar cel<Foam::ThermoParcel<Foam::KinematicParcel<Foam: article> > > > > > > > >::ReactingMultiphaseCloud(const char [15], Foam::volScalarField&, Foam::volVectorField&, const Foam::meshObjects::gravity&)’
);
^


3)
In file included from interReactingParcelFoam_chw.C:86:0:
createClouds.H:3:1: error: redeclaration of ‘Foam::basicReactingMultiphaseCloud parcels’
(
^


4)
/home/chw119/OpenFOAM/OpenFOAM-v1812/wmake/rules/General/transform:34: recipe for target 'Make/linux64GccDPInt32Opt/interReactingParcelFoam_chw.o' failed
make: *** [Make/linux64GccDPInt32Opt/interReactingParcelFoam_chw.o] Error 1



I'm assuming the first three errors have to do with the fact that I removed slgThermo from createClouds.H and I need to perhaps edit basicReactingMultiphaseCloud to be able to use it without having slgThermo as an argument. I have no idea where the last error is coming from or how to get rid of it. Relatively inexperienced with OpenFoam. Does anyone have any insight into where I should go from here? I attached the relevant files, including my Make files (files and options) which I edited to have the necessary header files available. Thank you.
Attached Files
File Type: zip solver_files_chw68014.zip (4.3 KB, 2 views)
chw68014 is offline   Reply With Quote

Old   April 25, 2019, 00:11
Default Keeping slgThermo
  #2
New Member
 
Chris
Join Date: Apr 2019
Posts: 9
Rep Power: 7
chw68014 is on a distinguished road
Based on discussions with my grad school professor, I'm keeping slgThermo as part of the solver; therefore, the errors I previously presented are no longer present. Instead, I'm getting errors that slgThermo is not declared in the scope. I have not found much guidance online regarding this error. I'm specifically getting the following errors:

"In file included from ../interReactingParcelFoam_chw/createFields.H:140:0,
from /home/chw119/OpenFOAM/OpenFOAM-v1812/src/OpenFOAM/lnInclude/postProcess.H:131,
from interReactingParcelFoam_chw.C:74:
../interReactingParcelFoam_chw/createClouds.H: In function ‘int main(int, char**)’:
../interReactingParcelFoam_chw/createClouds.H:8:5: error: ‘slgThermo’ was not declared in this scope
slgThermo
^~~~~~~~~
../interReactingParcelFoam_chw/createClouds.H:8:5: note: suggested alternative: ‘rhoThermo_H’
slgThermo
^~~~~~~~~
rhoThermo_H
In file included from createFields.H:140:0,
from interReactingParcelFoam_chw.C:82:
createClouds.H:8:5: error: ‘slgThermo’ was not declared in this scope
slgThermo
^~~~~~~~~
createClouds.H:8:5: note: suggested alternative: ‘rhoThermo_H’
slgThermo
^~~~~~~~~
rhoThermo_H"

I attached my solver files to this post. Does anyone know how to fix this specific "scope" error and does anyone have advice on how to fix this general type of error if it comes up for me in the future? Thank you for any help.
Attached Files
File Type: zip ME596-master.zip (11.4 KB, 13 views)
chw68014 is offline   Reply With Quote

Old   April 30, 2019, 23:56
Default Solved
  #3
New Member
 
Chris
Join Date: Apr 2019
Posts: 9
Rep Power: 7
chw68014 is on a distinguished road
I figured it out. I needed to add the thermal model to createFields.H as such:

autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
rhoReactionThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");

SLGThermo slgThermo(mesh, thermo);
chw68014 is offline   Reply With Quote

Reply


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



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