|
[Sponsors] |
April 2, 2019, 01:28 |
Combining interFoam and reactingParcelFoam
|
#1 |
New Member
Chris
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
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. |
|
April 25, 2019, 00:11 |
Keeping slgThermo
|
#2 |
New Member
Chris
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
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. |
|
April 30, 2019, 23:56 |
Solved
|
#3 |
New Member
Chris
Join Date: Apr 2019
Posts: 9
Rep Power: 7 |
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); |
|
|
|