View Issue Details

IDProjectCategoryView StatusLast Update
0004071OpenFOAMBugpublic2024-04-23 08:41
Reporternguyenhung97 Assigned Towill  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version22.04.3 LTS
Product Versiondev 
Fixed in Versiondev 
Summary0004071: number of injected parcels is wrong in patchInjection
DescriptionIn the tutorial TJunction ($FOAM_TUTORIALS/incompressibleFluid/TJunction), when I changed the duration to 1s and SOI to 0.5, I expected the number of parcels injected is 1000 (since parcelsPerSecond is set to 1000) but the actual result is 500.

However, it works normally when the SOI is set to 0 so I think the codes is not dealing with time relative to SOI.
Steps To ReproduceIn the tutorial TJunction ($FOAM_TUTORIALS/incompressibleFluid/TJunction),
1. Changed the duration to 1s and SOI to 0.5.
2. Run Allrun.sh
TagsNo tags attached.

Activities

nguyenhung97

2024-04-12 09:41

reporter   ~0013227

And also it does not inject anything if I set deltaT to small value (1e-5)

will

2024-04-12 21:51

manager   ~0013228

I can't reproduce the SOI issue. What commit of dev do you have? The output should have something that looks like "Build : dev-e7ca51c06555" in it. Or just upload a log.

The small time-step issue I can see. PatchInjection has a strange randomised implementation of nParcelsToInject which, as you rightly point out, seems to generate zeros if the time interval is too small. Other injectors (e.g., cone injection) do not seem to have this problem, so the problem can probably be fixed by copying the code across. I'll try next week. I need to figure out whether the patch injection's nParcelsToInject process has any merit or whether I can just replace it with the cone injector's version.

nguyenhung97

2024-04-14 13:58

reporter   ~0013229

I tested with the latest dev version and it worked fine with SOI issue.

FYI, I tested with OpenFOAM v10 and it worked for small time-step.

will

2024-04-23 08:41

manager   ~0013233

Fixed by https://github.com/OpenFOAM/OpenFOAM-dev/commit/7fbd730f2aa68da3b8fd973e06de6d5edaa99588

Issue History

Date Modified Username Field Change
2024-04-12 09:35 nguyenhung97 New Issue
2024-04-12 09:41 nguyenhung97 Note Added: 0013227
2024-04-12 21:51 will Note Added: 0013228
2024-04-14 13:58 nguyenhung97 Note Added: 0013229
2024-04-23 08:41 will Assigned To => will
2024-04-23 08:41 will Status new => resolved
2024-04-23 08:41 will Resolution open => fixed
2024-04-23 08:41 will Fixed in Version => dev
2024-04-23 08:41 will Note Added: 0013233