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/)
-   -   Lookup table/particle injection (https://www.cfd-online.com/Forums/openfoam-programming-development/171754-lookup-table-particle-injection.html)

ali.m.1 May 16, 2016 11:18

Lookup table/particle injection
 
Hi All

I have a made a kinematicCloudLookupTable which refreshes each timestep. My problem is that the solver does not look at the lookupTable each time step, but rather just takes the first value.
Does anyone know how I can force the solver to re-look up the values each time step? The .C files concerned are either InjectionModel.C, or KinematicLookupTableInjetcion.C. I have tried to include some sort of loop in these, (like in the main solver- with pimpleLoop) but with no sucess.

Any help would be appreciated. I've been stuck on this for a week now.

anishtain4 May 16, 2016 14:32

I haven't done something like that, but I know if the dictionary file's last modified time changes they will be read again. As a workaround you might try resaving dictionaries at each time step and OF will reads it automatically.

ali.m.1 May 17, 2016 07:05

Hi

The dictionary (constant/kinematicLookupTableInjection) does update every timestep, but the solver does not read this file every time step. It just reads it when you initialise the solver.
I need to force the injection method to read this dictionary every timestep. Any ideas?

ali.m.1 May 23, 2016 08:14

I've also tried defining the variable in createFields.H. Although this was refreshing each timestep, the injection wasn't updating.
I'll update if I manage to solve the problem.

anishtain4 May 25, 2016 11:07

If you're trying to inject it though a boundary condition try developing your own boundary condition, sometimes it's much faster.

ali.m.1 May 25, 2016 15:55

4 Attachment(s)
Hi

There already is an injection model which does almost what I want it to, so I would rather just edit this so that it reads every timestep (or when I tell it to at least).

I've attached 4 of the files which I have changed (I've changed more too, but these should give a good idea. I have added a column to the dataIO.C file, which is called 'numParticles'. In the lookupTable.C file, I have edited the variable on line 155 'parcelsToInject'.
So just to state my problem again, the injection model only looks at the table to initialise, whereas I want it to look up every timestep or so.

Any help welcome!

turbobluestreak November 23, 2016 16:58

Where you ever able to solve this problem? I'm trying to do a similar injection into one of my own codes and was looking for advise.




tbs

ali.m.1 November 24, 2016 09:08

Hi

No I haven't. The same problem still exists: the lookupTable is written every time step, but only read once, before the solver actually starts.

Does anyone have any ideas?

Ali

Chrisi1984 November 24, 2016 14:07

How did you compile your new injectionModel?

Kind regards
Chrisi

ali.m.1 November 25, 2016 05:19

Hi Chrisi

I just edited the current 'kinematicLiookupTableInjection' injection model from OpenFOAM. I added a new column to it, and write a new table every time step using OF stream.

Ali

Jasper Z December 26, 2022 14:46

Dear Ali,

Have you solved your problem? I am facing the exactly same problem as yours.

Thanks
Jasper

ali.m.1 December 26, 2022 17:30

Hi, please find my PhD thesis for more details

MMRC January 5, 2024 03:49

Quote:

Originally Posted by ali.m.1 (Post 841811)
Hi, please find my PhD thesis for more details


Hi Ali, where can we find your thesis? Thanks

ali.m.1 January 5, 2024 04:13

https://stax.strath.ac.uk/concern/theses/sq87bt630


All times are GMT -4. The time now is 04:12.