Fluidized Bed chemical reactors

Submitted by niqbal on Wed, 01/19/2011 - 17:07

Hi Chris,
I am interested to simulate a fluidized bed chemical reactors. The particles might be treated as chemical reactants that reacts with the surrounding fluid. This reaction increases the concentration of a particular substance (at first step only concentration ,no heat exchange is considered yet might be later on) in the fluid. I have looked up your code, and I found only momentum coupling. In this regard, I have certain querries
1- Do I need mass coupling for this?
As the mass coupling can accur through a variety of mechanism, like condensation, evaporation, chemical reaction
(which I am considering) ...
2. For this purpose, I think there is a need to assign some concentration to the the particles in the LIGGGHTS and also the decay rate. And is there some way to define the concentration to particles in LIGGGHTS and also the decay rate?
3. The decay in the particles will increase the concentration in the fluid. So the one-way coupling should be o.k ... or?
It seems to me, if 2. is possible, then I need to write an other scalar equation describing the concentration rate, like
the momCoupleModel.
4. Any literature that you can recommend to me.

Your kind guidance in this respect is highly appreciated.
Best Regards,
Naveed

cgoniva's picture

cgoniva | Wed, 01/19/2011 - 20:11

Hi Naveed!

1)
The coupling can of course handle "volume" coupling - it is just not included to the solver.
But I think you mean mass transfer from one phase to the other - right? This could be included, but as we neglect reactions for now, this was not yet necessary.

2)
What do you mean exactly? a particle carries some concentration of something?
Sounds interesting - in case the loss of this concentration does not make the particle shrink - your suggestion of using some scalar equation which is coupled to the particulate phase would be ok!

In principle, this scalar property of every particle could be organised only by the CFD side - but as the DEM side handles the organisation of the particles thingy become tricky when the number of particles in the domain changes.

We have allready done such a thing - transporting a scalar from DEM to CFD and back - so it can be done -but not with the currently available version.

Cheers,
Chris

ckloss's picture

ckloss | Thu, 01/20/2011 - 09:56

Hi Naveed,

>>but as the DEM side handles the organisation of the particles
>>thingy become tricky when the number of particles in the domain changes
I would not say it that way - its is perfectly possible to have scalar properties on the DEM side and couple this to CFD (we have already done this - but as Chris said, with another version than the one you can download via git). If you are interested, email us for further info.

Cheers,
Christoph

niqbal | Thu, 01/20/2011 - 11:18

Hi Christoph!
Thanks for your quick response. Yes I am highly interested. It is very nice that it is available. How can I get it? At which link, this git is available. Can you please let me know in detail? Do you want me to sent you an email for this purpose?
Best Regards
Naveed

niqbal | Fri, 01/28/2011 - 10:09

Hi Christoph,
I have simplified my problem for the first attempt. I need to model a scalar equation for a chemical concentration. For this purpose, I only need a new scalarField in DEM solver to which I could assign the value and also I could write this value in the couplingFiles like dragforce1, radius0, v0 and x0. For the first attempt, I do not need to read this value from the cfd solver to DEM solver. That means, this value will be a constant value assigned to the particles that will act a sort of source term for the cfd solver. I have looked into the fix_cfd_coupling_force.h/cpp files. I think, here I need to transfer the value to the OF i-e add_push_property ("source", scalar). But first I need also to set this scalarField in atom.h file. When I have looked into it, I found there are some scalar fields (i-e double *radius,*density,*rmass,*vfrac,*s0;). What here s0 is? Can I set this double value as a source term? Do you have some other simple solution to set a scalar value in the DEM solver and then write it for OF?
Thanks in advance.
Naveed

ckloss's picture

ckloss | Fri, 01/28/2011 - 10:43

>>I think, here I need to transfer the value to the OF i-e add_push_property ("source", scalar)
Yes

>>But first I need also to set this scalarField in atom.h file
No, the extensions are meant to work not via the atom class. Look at special_settings() in fix_cfd_coupling_force. There, a new property (the drag force, a vector) is added. Likewise, you can add a new scalar by using "scalar" instead of vector and changing "dragforce" into "concentration"

All you need is a class similar to fix_cfd_coupling_force. Thanks to object orientation, no changes anywhere else are needed.

Christoph

niqbal | Fri, 01/28/2011 - 14:06

Hi Christoph,
Thanks for immediate reply. To register concentration, I had included as per your suggestions as follows:
// register concentration

char* fixarg[11];
fixarg[0]="concentration";
fixarg[1]="all";
fixarg[2]="property/peratom";
fixarg[3]="concentration";
fixarg[4]="scalar";
fixarg[5]="no";
fixarg[6]="yes";
fixarg[7]="no";
fixarg[8]="0.";
fixarg[9]="0.";
fixarg[10]="0.";
concentration = modify->add_fix_property_peratom(11,fixarg);

where concentration is a pointer to FixPropertyPerAtom class declared in "..".h file as dragforce (class FixPropertyPerAtom* concentration).
Now I suppose
fixarg[8]="0.";
fixarg[9]="0.";
fixarg[10]="0.";
are fixarg to set the value for dragforce components. But as in my case, concentration is a scalar quantity, I need to assign only one fixarg[8]="0."; and remove the rest and also offcourse change the number of arguments to 9 from 11. Is that the case or ...? And is there any limitation on the number of arguments?
And as I need to set some value for concentration, whether I have to set the value right away here? or Is there some function to set the value?
Where I could have a look to know what these
fixarg[5]="no";
fixarg[6]="yes";
fixarg[7]="no"
fixarg are used for? I mean the "no", "yes" and "no"?
Thanks once again.
Naveed

ckloss's picture

ckloss | Fri, 01/28/2011 - 15:28

Yes, you are right, the 0. / 0. / 0. are the default values, i.e. for a scalar property there would be only one default value, and only 9 arguments.
The defaults can of course be overwritten by the user via the "set" command.

The first yes/no determines if this property will be saved in the simulation restart file or not.
The second and third yes/no define communication settings that allow the property to be communicated to neighbor processors in parallel (if needed). For a potential quantity, you mostly set "yes" "no", and for a flux quantity "no" "yes" (if in doubt, "yes" "yes" is possible too).

Cheers,
Christoph

niqbal | Fri, 01/28/2011 - 17:15

Hi Christoph,
Thanks for your help. I am having a problem in compiling the new updated file. I was thinking that I only need to compile the updated .cpp file. But it does not compile successfully. The last few lines of the error are as follows

/tmp/ccmTuLvj.o:(.rodata._ZTVN9LAMMPS_NS19FixCfdCouplingForceE[vtable for LAMMPS_NS::FixCfdCouplingForce]+0x110): undefined reference to `LAMMPS_NS::FixCfdCoupling::min_post_force(int)'
/tmp/ccmTuLvj.o:(.rodata._ZTVN3MPI3WinE[vtable for MPI::Win]+0x48): undefined reference to `MPI::Win::Free()'
/tmp/ccmTuLvj.o:(.rodata._ZTVN3MPI8DatatypeE[vtable for MPI::Datatype]+0x78): undefined reference to `MPI::Datatype::Free()'
/tmp/ccmTuLvj.o:(.rodata._ZTIN9LAMMPS_NS19FixCfdCouplingForceE[typeinfo for LAMMPS_NS::FixCfdCouplingForce]+0x10): undefined reference to `typeinfo for LAMMPS_NS::FixCfdCoupling'
collect2: ld returned 1 exit status
Then I tried also to compile any of the .cpp files so that to confirm that it is not because of the changes I had made in the file. But it also gives the similar errors. So do I have to recompile the whole code? or there any shorter way to update the changes? I have just compiled it with gcc compiler (g++).

Thanks once again for your help.
Regards,
Naveed

ckloss's picture

ckloss | Mon, 01/31/2011 - 07:39

Hi Naveed,

you should cross-check if you deleted or changed any of the original files. You sometimes get these kind of errors if you define a function in the .h file, but not in the .cpp file. If the error persists, I would suggest resuming this discussion in the LIGGGHTS forum, as this is not coupling-specific.

Christoph

niqbal | Mon, 01/31/2011 - 17:42

Dear Christoph/Chris,
Thanks for your value able answers. I have compiled the files successfully. It is writing the concentration value to the couplingFiles folder also. But after first time step, its waiting for the concentration value with this message.

Fix couple/cfd/file: waiting for file: ../CFD/couplingFiles/concentration0 (DEMruh.sh tab) and
wait for file "/tmp/naveed/OpenFOAM/niqbal-1.7.1/run/CFDEM/fluidBedReactor/settlingTest/CFD/couplingFiles/x1" (CFDrun.sh tab)

To me, it seems my implementation is not complete as after every time step the data is exchanged (x1, v,radius1,concentration1 written by DEM to x0, v0,radius0,concentration0 written by CFD solver). But I have not the value for concentration0.
Can you please figure it out to me where I had to make the changes to write the value for concentration (It should be on the OF side).

Regards,
Naveed

cgoniva's picture

cgoniva | Tue, 02/01/2011 - 18:15

Hi Naveed!

The data exchange happens file by file -
it is checked whether the other code has touched the file (renamed it) and then data is read.
As it reads the data file by file and keeps on waiting, the order is important.

have a look at the CFD side, where data is written to ./couplingFiles and add new functionality for concentration0. (have a look at cfdemCloud.C getDEMdata() )

Cheers,
Chris

niqbal | Thu, 01/20/2011 - 11:06

Hi Chris!
Thanks for your prompt reply.
I mean the concentration of chemical, that is a scalar quantity. And it can be safely considered that it does not effect the size of the particle (does not shrink).
It is quiet realistic to consider the number of particles are constant.
It is great that you have already implemented such a thing. Which scalar quantity exactly? When you will open source it?

Best Regards,
Naveed