Colliding Coal Cloud in coalCollidingChemistryFoam
Hello everyone!
My main goal for now is to be able to use coalChemistryFoam with colliding clouds. I don't have much knowledge in C++, and I've been using OpenFOAM for a few months now. I saw this thread http://www.cfd-online.com/Forums/ope...dingcloud.html, and I downloaded the collidingCoalCombustion directory. I changed the name of the cloud to coalCollidingCloud and compiled the collidingCoalCombustion library with wmake lib. I got this message : Code:
'/home/cesar/OpenFOAM/cesar-2.4.0/platforms/linux64GccDPOpt/lib/libcollidingCoalCombustion.a' is up to date. Then I copied the coalChemistryFoam directory to my home directory, changed its name to coalCollidingChemistryFoam and changed all the entries in the files to make reference to the new coalCollidingCloud, this is how the file are now (I supressed the beggining of the files, because I was running out of characters): coalCollidingChemistryFoam.C Code:
#include "fvCFD.H" Code:
Info<< "\nConstructing coal colliding cloud" << endl; Code:
Info<< "Creating combustion model\n" << endl; Code:
{ Code:
rho = thermo.rho(); Code:
{ Code:
fvVectorMatrix UEqn Code:
tmp<fv::convectionScheme<scalar> > mvConvection Code:
cesar@cesarnotebook:~/OpenFOAM/cesar-2.4.0/personalizado/coalCollidingChemistryFoam$ wmake I'm stucked in this error, and I don't know how to proceed. Can anybody help me? If is there anything else needed to solve the problem please tell me that I update the thread with the needed information. Thanks in advance! Regards from Brazil! |
Quote:
The error message of your solver does not include the link to collidingCoalCombustion library. Do you modified files in Make directory? |
Hi Snak, thanks for your reply.
I compiled the library with wmake lib command. After reading your reply, I try to recompile the library. First using wclean and then the wmake libso command. When I use the wmake libso I got an error: Code:
cesar@cesarnotebook:~/OpenFOAM/cesar-2.4.0/personalizado/collidingCoalCombustion$ wclean this is the library Make/options file: Code:
EXE_INC = \ Code:
/* Coal parcel and sub-models */ Code:
cesar@cesarnotebook:~/OpenFOAM/cesar-2.4.0/personalizado/collidingCoalCombustion$ wmake libso Make/files: Code:
coalCollidingChemistryFoam.C Code:
EXE_INC = \ UPDATE II: If I try to compile the solver, after successfully compiled the library with the wmake libso command, I got this: Code:
cesar@cesarnotebook:~/OpenFOAM/cesar-2.4.0/personalizado/coalCollidingChemistryFoam$ wmake |
I fixed the previous mistake in the make/options file, I was using the wrong sintax to describe the path and the library file. It now looks like this:
Code:
EXE_INC = \ Code:
cesar@cesarnotebook:~/OpenFOAM/cesar-2.4.0/personalizado/coalCollidingChemistryFoam$ wmake Can anyone please help me in this? Thanks in advance! |
any help would be appreciated
Hello everybody!
Just to summarize my problem: 1- I've sucessfully compiled the collidingCoalCombustion library, that turns the default coalCloud into kinematicCloud, so the interparticle collisions are computed. 2- I've created a new solver called coalCollidingChemistryFoam, which is suposed to use the collidingCoalCombustion library, and the new coalCloud. 2.1- the make/files is like this: Code:
coalCollidingChemistryFoam.C Code:
EXE_INC = \ Code:
cesar@cesarnotebook:~/OpenFOAM/cesar-2.3.1/personalizado/coalCollidingChemistryFoam$ wmake |
Hi,
Quote:
Please make sure you defined StochasticCollisionModel<<<.....>>>. good luck, |
Hi, snak! Thanks for your reply!
I don't understand why this error occurs! When I look into the .dep file, the stochasticCollisionModel is present: Code:
coalCollidingChemistryFoam.dep: $(WM_PROJECT_DIR)/src/lagrangian/intermediate/lnInclude/PatchInteractionModelNew.C Do you have a suggestion about why this error occurs? |
I think, problems will be on your own code.
I do not know exactly what you did. there is no way to say anything for sure. Please review your codes and the referenced customized codes. You are using StochasticCollisionModel<<<.....>>> in coalCollidingChemistryFoam ? I am not familiar with coalChemistryFoam and thermo-related cloud/parcel. I just use icoUncoupledKinematicParcelFoam. Lagrangian library uses multiple inheritance and template. Please check that the elements in <> of the error message is what you expect? |
Quick answer: Shinji has the correct idea here, I'm just not certain if it's the exact problem.
From what I can figure out, the problem is that the new library does not have the necessary object creation part that is needed for generating the desired combination. The quickest way to help you is that you provide the source code for the solver and library as an attachment. To do so, do the following steps:
|
2 Attachment(s)
Thanks a lot for your help, Bruno and Shinji!
I attached the compacted directories, Bruno! The only thing different from the beggining of the thread, is that I re-downloaded the original collidingCoalCombustion (from http://www.cfd-online.com/Forums/ope...dingcloud.html), and used it as it comes (I was trying to figure if renaming the files were the problem - it's not). Thanks again and have a nice day! |
Hi César,
Sorry, but didn't manage to have enough time this weekend to fully diagnose the origin of this problem. What I do know is that the issue is in one of the files in "collidingCoalCombustion":
Code:
Foam::StochasticCollisionModel<Foam::KinematicCloud<Foam::Cloud<Foam::ReactingMultiphaseParcel<Foam::ReactingParcel<Foam::ThermoParcel<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > > > > > Code:
makeParcelDispersionModels(coalCloud); You will have to look at the original files in OpenFOAM, in the folder given by this command: Code:
echo $FOAM_SRC/lagrangian/ The other possibility is that you might need to take a step back to OpenFOAM 2.2 or 2.1, because I suspect that this is due to something that was upgraded in OpenFOAM 2.3. Best regards, Bruno |
Dear Bruno, thanks a lot for your help! I just added the lines
Code:
#include "makeParcelStochasticCollisionModels.H" Code:
makeParcelStochasticCollisionModels(coalCloud); I will adjust some other things in the case that I'm studying -mainly devolatilization and heterogeneous reactions(I might have to ask for help again)- and, as soon as I finished this, I'll post here the library, the solver and the test case, so anyone interested in the subject can download it. |
Thank you for your share
Dear cmigueis,
Your work is pretty good. I want to simulate the coal combustion in a dense-phase fluidized bed, that is, four-way coupling should be taken into account. I see in your work you take the parcel collisions into consideration, however, it looks like that your model cannot utilized to model reacting dense two-phase flow. However, based on your work, I think is available and I will do it based on yours. Thank you for your share, look forward. Best wishes! |
Hi, Shuai, thanks for your considerations!
I didn't understand what you've said in the last part of your comment, I just added the parcel collision into the model, which already was a reacting parcel... why it can't model reacting dense two-phase flow? |
di
Dear cmigueis,
Thank you for your quick reply. First of all, I mean that your work can model reacting dilute two-phase flow, but not reacting dense two-phase flow. We can see in DPMFoam solver, there is an “alphac” in the mass and momentum equations of Ueqn.H, which mean the void fraction (voidage). However, in coalChemistryFoam, there isn’t a void fraction. That is, even though you implement coal cloud collisions into coalChemitryFoam, it look like DPM model in ANSYS Fluent, but not a CFD-DEM model with reaction, you should also implement “alphac”(voidage) into mass, momentum and energy equations. For more details, you can have a look at article “Ku X, Li T, Løvås T. CFD–DEM simulation of biomass gasification with steam in a fluidized bed reactor [J]. Chemical Engineering Science, 2015, 122: 270-283.” or “Zhou H, Flamant G, Gauthier D. DEM-LES simulation of coal combustion in a bubbling fluidized bed Part II: coal combustion at the particle level [J]. Chemical Engineering Science, 2004, 59(20): 4205-4215.”, in these work, four-way coupling CFD-DEM with reaction were adopted to simulate a fluidized bed. The former is accomplished on OpenFOAM framework. In my opinion, if you want to model dense phase reacting flow like above literature, I think DPMFoam combined with coalChemistryFoam can achieve it, which is the work I want to do and I am doing. Generally speaking, DPMFoam has already had parcels collisions and it is CFD-DEM method which can be used in cold fluidized bed modeling. If you only model pulverized coal combustion (that is, reacting dilute two-phase flow), four-way coupling is not necessary. Best regards! |
Shuai, I apologize for the confusion! Now I understand what you've said! You're absolutely right! I was now trying to include the volumetric fraction of void into the model! The interstitialInletVelocity condition that I want to use in my model also requires the void fraction! Yes, the work of Ku et. al. is one of the main references that I'm using, together with the work of Oevermann and Gerber (2009)... If you have sucess in this task, or if I can help you in anything (although I don't have an advanced level of OpenFOAM/C++ knowledge) please let me know!
|
3-step char combustion chemsitry mechanism
Dear cmigueis,
Thank you for your reply. I am very glad that someone does the same work with me. Frankly speaking, reacting dense two-phase flow simulation is widely used in many fields. I was now trying it, too. If I have some progress, I will share it with you. Now, I am trying to implement a 3-step char combustion chemsitry mechanism for coalChemistryFoam solver. I intend to use following reactions to determine consumption of C: C + 0.5O2 --> CO ; K1 is the rate constant C + CO2 --> 2CO ; K2 is the rate constant C + H2O --> CO+H2 ; K3 is the rate constant After accomplish this, I will take the void fraction into account. Best regards! |
Missing piece
Thank you, everyone.
Your posts have been informative. However, I looked at the developed collidingCoalCloud and realised that it does not accept the mu value during creation. As a result, I think it is perhaps the needed piece to have an effective DEM simulation, as mu is needed to calculate some particle behaviors like drag. Does anyone have an idea on how to include mu in the creation of collidingCoalCloud. Thank you. |
Problem implementing Collission into reactingParcel
Hi all,
according to this posting and that ( http://www.cfd-online.com/Forums/ope...dingcloud.html ) i tried to implement the collission model into the coalChemitryFoam or reactingParcelFoam In which OF version was the solver from "cmigueis" developed? When i want to compile the solver it is without success. So i tried to do the modifications in OF3.0.0 which were not the big deal, the modified basicKinematicReactingMulitphaseCloud compiled. But when i want to compile the solver with the new parcel cloud type i have a big problem (the errorcode is in the appendix). So can you tell me in which version the solver from cmigueis is developed or can someone give me his now running version with the collission model? At my error output at solver compilation there seems to be a linking error but i cant find the reason. The whole modified lagrangian folder compiles without errors, as long as i do not implement the collission model into the basicKinematicReactingMulitphase Parcel and Cloud the solver compiles. When i implement the collission model the lagrangian folder compiles but the solver makes the following output. Making dependency list for source file reactingParcelFoam.C g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/finiteVolume/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/meshTools/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/TurbulenceModels/compressible/lnInclude -I./lagrangian/basic/lnInclude -I./lagrangian/DSMC/lnInclude -I./lagrangian/solidParticle/lnInclude -I./lagrangian/spray/lnInclude -I./lagrangian/turbulence/lnInclude -I./lagrangian/intermediate/lnInclude -I./lagrangian/coalCombustion/lnInclude -I./lagrangian/distributionModels/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/specie/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/transportModels/compressible/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/basic/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/properties/liquidProperties/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/properties/liquidMixtureProperties/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/properties/solidProperties/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/properties/solidMixtureProperties/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/thermophysicalFunctions/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/reactionThermo/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/SLGThermo/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/chemistryModel/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/radiation/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/ODE/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/regionModels/regionModel/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/regionModels/surfaceFilmModels/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/combustionModels/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/fvOptions/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/sampling/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/applications/solvers/combustion/reactingFoam -IlnInclude -I. -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/OpenFOAM/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/OSspecific/POSIX/lnInclude -fPIC -c reactingParcelFoam.C -o Make/linux64GccDPInt32Opt/reactingParcelFoam.o g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/finiteVolume/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/meshTools/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/TurbulenceModels/compressible/lnInclude -I./lagrangian/basic/lnInclude -I./lagrangian/DSMC/lnInclude -I./lagrangian/solidParticle/lnInclude -I./lagrangian/spray/lnInclude -I./lagrangian/turbulence/lnInclude -I./lagrangian/intermediate/lnInclude -I./lagrangian/coalCombustion/lnInclude -I./lagrangian/distributionModels/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/specie/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/transportModels/compressible/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/basic/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/properties/liquidProperties/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/properties/liquidMixtureProperties/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/properties/solidProperties/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/properties/solidMixtureProperties/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/thermophysicalFunctions/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/reactionThermo/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/SLGThermo/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/chemistryModel/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/thermophysicalModels/radiation/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/ODE/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/regionModels/regionModel/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/regionModels/surfaceFilmModels/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/combustionModels/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/fvOptions/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/sampling/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/applications/solvers/combustion/reactingFoam -IlnInclude -I. -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/OpenFOAM/lnInclude -I/home/TPT-Sim7/foam/OpenFOAM-3.0.0/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/reactingParcelFoam.o -L/home/TPT-Sim7/foam/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -lmeshTools -lturbulenceModels -lcompressibleTurbulenceModels -llagrangian -llagrangianIntermediate -llagrangianTurbulence -lspecie -lcompressibleTransportModels -lfluidThermophysicalModels -lliquidProperties -lliquidMixtureProperties -lsolidProperties -lsolidMixtureProperties -lthermophysicalFunctions -lreactionThermophysicalModels -lSLGThermo -lchemistryModel -lradiationModels -lODE -lregionModels -lsurfaceFilmModels -lcombustionModels -lfvOptions -lsampling -lOpenFOAM -ldl \ -lm -o /home/TPT-Sim7/OpenFOAM/TPT-Sim7-3.0.0/platforms/linux64GccDPInt32Opt/bin/reactingParcelFoamDEM01 Make/linux64GccDPInt32Opt/reactingParcelFoam.o: In function `Foam::IOPosition<Foam::Cloud<Foam::ReactingMultip haseParcel<Foam::ReactingParcel<Foam::ThermoParcel <Foam::CollidingParcel<Foam::KinematicParcel<Foam: article> > > > > > >::type() const': reactingParcelFoam.C .text._ZNK4Foam10IOPositionINS_5CloudINS_24Reactin gMultiphaseParcelINS_14ReactingParcelINS_12ThermoP arcelINS_15CollidingParcelINS_15KinematicParcelINS _8particleEEEEEEEEEEEEEE4typeEv[_ZNK4Foam10IOPositionINS_5CloudINS_24ReactingMulti phaseParcelINS_14ReactingParcelINS_12ThermoParcelI NS_15CollidingParcelINS_15KinematicParcelINS_8part icleEEEEEEEEEEEEEE4typeEv]+0x3): undefined reference to `Foam::Cloud<Foam::ReactingMultiphaseParcel<Foam:: ReactingParcel<Foam::ThermoParcel<Foam::CollidingP arcel<Foam::KinematicParcel<Foam:article> > > > > >::typeName' Make/linux64GccDPInt32Opt/reactingParcelFoam.o: In function `Foam::Cloud<Foam::ReactingMultiphaseParcel<Foam:: ReactingParcel<Foam::ThermoParcel<Foam::CollidingP arcel<Foam::KinematicParcel<Foam:article> > > > > >::type() const': reactingParcelFoam.C .text._ZNK4Foam5CloudINS_24ReactingMultiphaseParce lINS_14ReactingParcelINS_12ThermoParcelINS_15Colli dingParcelINS_15KinematicParcelINS_8particleEEEEEE EEEEEE4typeEv[_ZNK4Foam5CloudINS_24ReactingMultiphaseParcelINS_1 4ReactingParcelINS_12ThermoParcelINS_15CollidingPa rcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEE 4typeEv]+0x3): undefined reference to `Foam::Cloud<Foam::ReactingMultiphaseParcel<Foam:: ReactingParcel<Foam::ThermoParcel<Foam::CollidingP arcel<Foam::KinematicParcel<Foam::particle> > > > > >::typeName' Make/linux64GccDPInt32Opt/reactingParcelFoam.o: In function `Foam::ReactingMultiphaseParcel<Foam::ReactingParc el<Foam::ThermoParcel<Foam::CollidingParcel<Foam:: KinematicParcel<Foam::particle> > > > >::type() const': reactingParcelFoam.C.text._ZNK4Foam24ReactingMulti phaseParcelINS_14ReactingParcelINS_12ThermoParcelI NS_15CollidingParcelINS_15KinematicParcelINS_8part icleEEEEEEEEEE4typeEv[_ZNK4Foam24ReactingMultiphaseParcelINS_14ReactingP arcelINS_12ThermoParcelINS_15CollidingParcelINS_15 KinematicParcelINS_8particleEEEEEEEEEE4typeEv]+0x3): undefined reference to `Foam::ReactingMultiphaseParcel<Foam::ReactingParc el<Foam::ThermoParcel<Foam::CollidingParcel<Foam:: KinematicParcel<Foam:article> > > > >::typeName' Make/linux64GccDPInt32Opt/reactingParcelFoam.o: In function `Foam::ReactingParcel<Foam::ThermoParcel<Foam::Col lidingParcel<Foam::KinematicParcel<Foam::particle> > > >::type() const': reactingParcelFoam.C.text._ZNK4Foam14ReactingParce lINS_12ThermoParcelINS_15CollidingParcelINS_15Kine maticParcelINS_8particleEEEEEEEE4typeEv[_ZNK4Foam14ReactingParcelINS_12ThermoParcelINS_15C ollidingParcelINS_15KinematicParcelINS_8particleEE EEEEEE4typeEv]+0x3): undefined reference to `Foam::ReactingParcel<Foam::ThermoParcel<Foam::Col lidingParcel<Foam::KinematicParcel<Foam::particle> > > >::typeName' . . . . . . . . . . . |
The version of OpenFoam I use
Hi Polli,
The version of OpenFoam I used is 2.3.1, so I suggest that you should compile the codes in 2.3.1. If you have some problems, I will give you some advice. Wang |
All times are GMT -4. The time now is 09:06. |