CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   How to add collisionModel in reactingParcelFoam? (https://www.cfd-online.com/Forums/openfoam-programming-development/172960-how-add-collisionmodel-reactingparcelfoam.html)

chpjz0391 June 10, 2016 03:39

How to add collisionModel in reactingParcelFoam?
 
Hi Foamers,

I am quite new to OF, now I am trying to add particle collisionModel in reactingParcelFoam? But I am poor in C++.

Could someone give me some suggestion or tutorials about how to achieve this?

Thanks

Ping

bijan darbari June 11, 2016 09:13

Dear chpjz0391

Read this report,the author described how to add submodels:


http://www.tfd.chalmers.se/~hani/kur...man-Arshad.pdf
http://www.tfd.chalmers.se/~hani/kur.../movies.tar.gz


but remember that you must addressed your modified lagrangian/intermediate library in your solver/Make/Options. else your solver didn't find it you can't use your new submodel.

chpjz0391 June 12, 2016 21:15

Quote:

Originally Posted by bijan darbari (Post 604401)
Dear chpjz0391

Read this report,the author described how to add submodels:


http://www.tfd.chalmers.se/~hani/kur...man-Arshad.pdf
http://www.tfd.chalmers.se/~hani/kur.../movies.tar.gz


but remember that you must addressed your modified lagrangian/intermediate library in your solver/Make/Options. else your solver didn't find it you can't use your new submodel.

Hi bijian,

Thank you very much. I will try.

Kind Regards.

Ping

chpjz0391 June 13, 2016 02:18

Quote:

Originally Posted by bijan darbari (Post 604401)
Dear chpjz0391

Read this report,the author described how to add submodels:


http://www.tfd.chalmers.se/~hani/kur...man-Arshad.pdf
http://www.tfd.chalmers.se/~hani/kur.../movies.tar.gz


but remember that you must addressed your modified lagrangian/intermediate library in your solver/Make/Options. else your solver didn't find it you can't use your new submodel.


Hi bijian,

Sorry to disturb you again. I have followed that report, but it did not work.Below is my step:

1. I copied CollisionModel folder from src/lagrangian/intermediate/submodels/Kinematic to src/lagrangian/intermediate/submodels/ReactingMultiphase
2. I copied makeParcelCollisionModels.H to makeReactingMultiParcelCollisionModels.H under src/lagrangian/intermediate/parcels/include
3. I changed "makeParcelCollisionModel_H" to "makeReactingMultilParcelCollisionModel_H" in the new makeReactingMultiParcelCollisionModels.H
4. wclean and wmake libso
5. I added collisionModel under reactingCloud1Properties in constant

When I run the case, it doest work. I mean the collision submodel was still not available.

Can you give me some suggestions?

King Regards,

Ping

bijan darbari June 13, 2016 03:22

Dear chpjz0391

Is your modified lagrangian library ( intermediate ) in Home directory??

chpjz0391 June 13, 2016 04:26

1 Attachment(s)
Quote:

Originally Posted by bijan darbari (Post 604566)
Dear chpjz0391

Is your modified lagrangian library ( intermediate ) in Home directory??

I know where is the problem. I forgot to define the makeReactingMultiphaseParcelCollisionModels.H
under parcels/derived/basicReactingMultiphaseParcel.

But after I defined that, I got another error. show in the picture.

Attachment 48213

I have no idea what is going on.

chpjz0391 June 21, 2016 03:52

Quote:

Originally Posted by bijan darbari (Post 604566)
Dear chpjz0391

Is your modified lagrangian library ( intermediate ) in Home directory??

Hi bijian,

I have solved my problem, I forget to modified the files under the parcels/derived/basicReactingParcelFoam and cloud/derived.

Cheers,

Ping

Sylvain July 19, 2016 11:27

Hi Bijan

I tried to use the methodology described in the report to adda new CloudFunction Object. So i recompiled the whole intermediate library inside my $FOAM_RUN directory.

But when I run the solver it says that the functions are defined twice.

when you says:
Quote:

but remember that you must addressed your modified lagrangian/intermediate library in your solver/Make/Options. else your solver didn't find it you can't use your new submodel.
That means that the solvers has also to be recompiled in the $FOAM_RUN directory, with the modified intermediate library, in order to be able to use the new model???

Thanks for your help

Sylvain

bijan darbari July 19, 2016 14:43

Dear Sylvain

At the first, test that your new "cloudfunctionobject" have been added to your solver or not!!!

That warning was not important.

Quote:

That means that the solvers has also to be recompiled in the $FOAM_RUN directory, with the modified intermediate library, in order to be able to use the new model???
yes. do his steps:

Code:

  -          rename “intermediate” to “myintermediate”
  -          create your modified solver
  -          open “solverfolder/make/options”
  -          replace “-llagrangianIntermediate \” by “-L$(FOAM_USER_LIBBIN)-lmylagrangianIntermediate \”
  -          replace “-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \” by “-I$(WM_PROJECT_USER_DIR)/myintermediate/lnInclude \”
  -          compile your modified solver

Best wishes.

Sylvain July 20, 2016 04:39

Thank you so much Bijan

actually it was those two lines i didn't know how to write

Code:

  -          replace “-llagrangianIntermediate \” by “-L$(FOAM_USER_LIBBIN)-lmylagrangianIntermediate \”
  -          replace “-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \” by “-I$(WM_PROJECT_USER_DIR)/myintermediate/lnInclude \”

but you were right in the first place, the solver didn't find my new cloud function object.

I don't know what is wrong as i have declared it in the makeParcelCloudFunctionObjects.H

What I don't understand is that we have know two intermediate libraries side by side with two different list of cloudfunctionobject. is it the fact that i compiled my new solver with my new library which guarantees that he using my new library?

Best regards

Sylvain

poseidon_CFD September 29, 2020 14:18

Quote:

Originally Posted by chpjz0391 (Post 605850)
Hi bijian,

I have solved my problem, I forget to modified the files under the parcels/derived/basicReactingParcelFoam and cloud/derived.

Cheers,

Ping


Hello


I am facing the exact same error right now as the picture you posted before this message. Can you please tell how did you resolve the issue?

chathuranga October 15, 2020 02:35

@poseidon_CFD
As I understand, you have to modify parcels/derived/basicReactingMultiphaseParcel and that of cloud/derived/ since the error massage questions about the parcel type.

Nadun19 May 31, 2023 18:15

Has anyone managed to successfully add collisions to reacting parcels on a later version of OpenFOAM (5+). If so could you please provide the source code for the modified lagrangian library.


All times are GMT -4. The time now is 03:33.