Skip to content

Update adaptive half timestep#194

Open
AhmedSalih3d wants to merge 18 commits into
BeforeLidDrivenCavityExamplefrom
codex/find-cause-of-oscillations-at-0.1-output
Open

Update adaptive half timestep#194
AhmedSalih3d wants to merge 18 commits into
BeforeLidDrivenCavityExamplefrom
codex/find-cause-of-oscillations-at-0.1-output

Conversation

@AhmedSalih3d

Copy link
Copy Markdown
Owner

Motivation

  • Prevent unphysical density oscillations when OutputTimes is large by ensuring the predictor half-step stays consistent with the adaptively-updated full timestep dt.

Description

  • Recompute the predictor half-step inside the inner simulation loop by inserting dt₂ = dt * 0.5 at the top of the while SimMetaData.TotalTime <= NextOutputTime block in src/SPHCellList.jl so the half-step tracks the current adaptive dt.

Testing

  • Ran julia --project=. -e 'using SPHExample; println("loaded")' which loaded the package successfully; git diff --check returned clean; running the test suite with julia --project=. -e 'using Pkg; Pkg.test()' produced an unrelated test error because test/runtests.jl calls Δt with an outdated 5-argument signature, not caused by this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant