Replies: 1 comment
|
Yeah, I think your diagnosis is right. At the master commit you linked, the single-zone driver sets So for a nonautonomous MMS source, the current sequence is basically
which gives exactly the old-time recurrence you measured. It is still first-order consistent under The potentially more important case is
so the lagged forcing can reduce the temporal convergence to first order for a genuinely time-dependent source. I would include both first- and second-order dual-time cases in the regression. I would avoid treating the My preference would be to define the time levels explicitly. something like stored-state time versus target/solution time—and use the target time for MMS source and boundary evaluation. Then the output and restart paths can keep whichever convention they require. tldr; yes, the current source explains your observed recurrence, and the uniform transient MMS case looks like a good regression test. The remaining maintainer question is whether the old-time source evaluation was intentional or is just an ambiguous physical-time convention. |
Uh oh!
There was an error while loading. Please reload this page.
I have a small manufactured-solution reproducer and would like to clarify the intended time contract of
GetMMSSourceTermin single-zone first-order dual-time stepping. Is the callback intentionally evaluated at the old physical time, or should it receive the time of the updated solution?This is related to the temporal-verification topic in discussion #1441, but isolates a spatially uniform, time-dependent source. I am not claiming that SU2's time integrator is inconsistent: both recurrences below are first-order consistent.
Analytic control
On a periodic cube use
INC_NAVIER_STOKES, constant density 1, viscosity 0.01, energy disabled, andAll spatial derivatives vanish, so the PDE reduces to
du_x/dt=2t. Initializeu_x=1at time zero. After k updates of size h:(k-1)h:U_k = 1+h^2*k*(k-1).kh(fully backward Euler):U_k = 1+h^2*k*(k+1).1+(kh)^2.Neither discrete recurrence is the exact continuous solution at finite h.
Observed behavior
With the unmodified driver and source assembly in v8.5.0, commit
12eb826f049ef7f67df974dfcb44cf36ee07c0f8, the customUSER_DEFINED_SOLUTIONcontrol matches the old-time recurrence at every step within2.7e-11. All four reported residuals are below10^-10at each update.A diagnostic intervention changing only the single-zone
SetPhysicalTimeargument fromTimeIter*hto(TimeIter+1)*hswitches the results to the next-time recurrence within the same tolerance. This is a causal check, not a proposed general fix: restart, multizone, moving-grid and second-order behavior have not been tested.Source inspection of master
bc15466602a687d6fb796d5df7a12ce3fde0949astill shows the same time assignment and MMS consumer. I have not rerun a fresh master executable.Reproducer and environment
Fixed evidence commit:
Each archive contains the config, 4³-element periodic mesh, restart fields, history, logs, command and exit code. Linux arm64 Ubuntu 24.04 container, GCC 13.3.0, double precision, MPI disabled, two OpenMP threads. Source archives and image IDs are recorded.
Would it be useful to document this callback/output time convention and add this uniform transient MMS as a regression case? If the old-time evaluation is intentional, an explicit example would help users avoid comparing an updated state against a reference at the displayed old time. If the intended callback time is the updated time, a fix would need to review all consumers and time schemes rather than applying the diagnostic edit blindly.
All reactions