Kratos
Kratos copied to clipboard
[Fluid] Standarize buffer filling
📝 Description
This PR (finally) makes the buffer filling of the FluidDynamicsApplication
solvers properly, that is to say à la StructuralMechanicsApplication
. As you note, what we basically do is to go backwards such that we do enough "fake" CloneSolutionStep
operations instead of dropping the initial steps until the buffer is filled as we've done so far (see the function _SetAndFillBuffer
in the fluid_solver.py
). Thanks to this we're starting the simulations at time step one, which is what the user expects. On top of this, this makes possible the usage of buffer > 2 time schemes in the CFD ROM.
(as we're solving an "extra" time step, this required to slightly modify our current test values...)
PD: initialize_with_compressible_potential_flow_process_test
is the unique test failing. @EduardGomezEscandell will take care of it. Creating the PR to start triggering the CI.
PD2: @KratosMultiphysics/pfem2 and @KratosMultiphysics/shallow-water also use the dropping step(s) bad practice. I think it will be positive to do what we're doing in here.
hm this will probably also change many other test results for sure the ones in CoSim and MeshMoving (=> ale-fluid solver)
hm this will probably also change many other test results for sure the ones in CoSim and MeshMoving (=> ale-fluid solver)
Potentially yes.
Hello Rubén, I'll deal with the PFEM2Application over the weekend. Thanks for your feedback. Regards
Be careful. Some time ago I tried the same in the ShallowWaterApp, but I faced some problems with the initial time. I think you're reading the initial time at the PrepareModelPart
but the time is not set. #9267 is related to that
Great! Thank you @miguelmaso! Regards
@miguelmaso @dcagritan My comment was only for letting you know. Non-core application changes must be done in a different PR.
@rubenzorrilla, yes, I'm aware of that. Thanks for letting me know! Good day
Issues with Swimming DEM application are handled in #10179.
About the fluid adjoint analysis stuff, we're (@sunethwarna) are discussing the best way to get rid of the nsteps
in problem_data
section and the negative time step.
I will get rid of the nsteps
in the ajoints and will have usual start_time
and end_time
in problem_data
. We don't have a problem with the problem_data
section and the negative time step ryt? It is set at the solver_settings
part.
I will get rid of the
nsteps
in the ajoints and will have usualstart_time
andend_time
inproblem_data
. We don't have a problem with theproblem_data
section and the negative time step ryt? It is set at thesolver_settings
part.
As we discussed yesterday, I'd avoid a negative time step, as it is in my opinion a bit counterintuitive for the user (note that current CI error comes indeed from a check that ensures exactly this). Instead I'd modify the _ComputeDeltaTime
in the AdjointFluidSolver
to put the minus under the hood, so the user (or the GUI) doesn't need to do anything special.
I will get rid of the
nsteps
in the ajoints and will have usualstart_time
andend_time
inproblem_data
. We don't have a problem with theproblem_data
section and the negative time step ryt? It is set at thesolver_settings
part.As we discussed yesterday, I'd avoid a negative time step, as it is in my opinion a bit counterintuitive for the user (note that current CI error comes indeed from a check that ensures exactly this). Instead I'd modify the
_ComputeDeltaTime
in theAdjointFluidSolver
to put the minus under the hood, so the user (or the GUI) doesn't need to do anything special.
@sunethwarna any advance in this regard? I don't mind taking care of the suggested changes.
Required changes in the adjoint were done in #10312.
@rubenzorrilla did you run all the tests in the CoSimApp? I am afraid this can affect it too
FYI @mpentek this might affect some results
@rubenzorrilla did you run all the tests in the CoSimApp? I am afraid this can affect it too
FYI @mpentek this might affect some results
Aren't these run by the CI?
only the very small FSI tests are run in the CI However since coupled sims usually run longer they are part of the validation suite
Can you hence please run all tests? I thought for bigger changes such as this it was the responsibility of the dev to run the tests and not only rely on the CI?
only the very small FSI tests are run in the CI However since coupled sims usually run longer they are part of the validation suite
Can you hence please run all tests? I thought for bigger changes such as this it was the responsibility of the dev to run the tests and not only rely on the CI?
OK. No problem, I'll run them again. Indeed, I think I ran all of them when amending the SDOF test results.
only the very small FSI tests are run in the CI However since coupled sims usually run longer they are part of the validation suite Can you hence please run all tests? I thought for bigger changes such as this it was the responsibility of the dev to run the tests and not only rely on the CI?
OK. No problem, I'll run them again. Indeed, I think I ran all of them when amending the SDOF test results.
Seems that all the tests are OK. :+1:
Merging. Just to be sure again, I ran all the fluid-related tests (conv-diff, potential flow, FSI, co-sim, rans, etc...).