phorgue / porousMultiphaseFoam

A porous multiphase toolbox for OpenFOAM
Other
124 stars 64 forks source link

sourceEventFileWater with a time-variable injection position. #34

Open seasoulnk opened 1 year ago

seasoulnk commented 1 year ago

I just want to test the source function, so I changed the injection.evt file in the tutorial directory ("tutorials/impesFoam-tutorials/injectionExtraction/injection") to be

`date 0

2.0 8.1 0.5 -5e-5

2.1 8.1 0.5 -5e-5

date 20000

4.95 8.1 0.5 -5e-5

5.05 8.1 0.5 -5e-5

date 40000

8.0 8.1 0.5 -4e-5

8.10 8.1 0.5 -4e-5`

What I expect to see is that the source location changes at different time, so that when the simulation continues, the water stream location changes. It will clearly prove that the source term work. But I only see the source term at date 0 happens but the succeeding sources does not. If I change the location of date 0, it did change the location of the source.

Thank you.

phorgue commented 1 year ago

The source function does not handle time-varying location,s it allows only time-dependent injection values. For example :

date 0
2.0 8.1 0.5 -5e-5
date 20000
2.1 8.1 0.5 -2e-5

will perform time linear interpolation for injection value from t=0/value=5e-5 to t=20000/value=-2e-5 but taking only the first coordinates (x=2.0) and other coordinates are not used.

Your moving injection point is possible but would require the development of the interpolation of source location between the two dates. Moreover, we should add in that case an update of the source location (currently, source locations are computed at the beginning of the simulation).

I keep the issue open but mark it as enhancement

Pierre

seasoulnk commented 1 year ago

Thank you. Now I understand that in the sourceEvent file, the locations for the specified time other than the first one, are only dummy values.

Looking forward to your enhancement.

Thank you.