Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor output of paraview files and time step calculation #1341

Merged
merged 28 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1a05a2b
Add new param and fix time steps accordingly
lpsaavedra Oct 29, 2024
035e0e4
Add new bool parameter and modify output time frequency
lpsaavedra Oct 30, 2024
de145f8
Modify functions for output and calculate time step
lpsaavedra Oct 30, 2024
14a66aa
Update coments and removed duplicated calculate time step functions
lpsaavedra Oct 30, 2024
03237fa
Correct typo
lpsaavedra Oct 30, 2024
82313cc
Remove dynamic output control class
lpsaavedra Oct 30, 2024
20c4c6b
Update output iteration tests
lpsaavedra Oct 30, 2024
c59cb99
Update average velocities test
lpsaavedra Oct 30, 2024
9d4883d
Update failing tests due to last time step
lpsaavedra Oct 30, 2024
b576378
Add output time frequency
lpsaavedra Oct 31, 2024
7f4c44d
Add output time frequency to tests
lpsaavedra Oct 31, 2024
7a42c46
Fix typo and add default interval to test
lpsaavedra Oct 31, 2024
7253622
Minor simplifications
lpsaavedra Oct 31, 2024
a29a66c
Move time parameters to transient simulation control
lpsaavedra Oct 31, 2024
7ff881e
Update failing test
lpsaavedra Nov 1, 2024
ac77c5e
Allow to specify several output times in a list
lpsaavedra Nov 4, 2024
1dac179
Fix tests
lpsaavedra Nov 4, 2024
0d199f5
Add specific time for output
lpsaavedra Nov 4, 2024
ce3601e
Use convert string to vector function
lpsaavedra Nov 4, 2024
c6fd2e5
Update documentation
lpsaavedra Nov 4, 2024
dda7dc0
Update documentation and examples
lpsaavedra Nov 4, 2024
68db489
Add new deafult parameters in all relevant core and solvers tests
lpsaavedra Nov 5, 2024
4e9a913
Remove vtu slice code
lpsaavedra Nov 5, 2024
a2d8068
Add flag to check whether the output times vector has more elements o…
lpsaavedra Nov 5, 2024
6c28487
Update name of end time parameter in simulation control
lpsaavedra Nov 8, 2024
3b74010
Initialize parameters in constructor
lpsaavedra Nov 8, 2024
33cc7f9
Add changelog entry
lpsaavedra Nov 11, 2024
67b96b1
write output times vector index when checkpointing
lpsaavedra Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to the Lethe project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [Master] - 2024-11-11

### Changed

- MAJOR The time step in the simulation control class is no longer modified by default to be exactly the end time of the simulation. Moreover, the time step is no longer modified to output Paraview files at certain times, therefore, the time output for transient simulations was refactored. [#1336](https://github.com/chaos-polymtl/lethe/pull/1341)

## [Master] - 2024-11-04

### Changed
Expand All @@ -19,7 +25,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

- MINOR Force chains between local-ghost particle were being written multiple time when running in parallel. An arbitrary rule was added so that only one of the process is writing the force chain.[#1342](https://github.com/chaos-polymtl/lethe/pull/1342)


### Fix

- MINOR It was not possible to differentiate cohesive and repulsive forces with the force chains since the code was using the ".norm()" function. Now, the force chain calculation uses the scalar product between the normal force and the normal unit vector. [#1339](https://github.com/chaos-polymtl/lethe/pull/1339)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,17 @@ VOF Mass Conservation
time surface_fluid_0 mass_per_length_fluid_0 momentum-x_fluid_0 momentum-y_fluid_0 surface_fluid_1 mass_per_length_fluid_1 momentum-x_fluid_1 momentum-y_fluid_1 sharpening_threshold
7.812000e-06 1.068750e-01 1.906650e-10 1.507758e-11 7.716538e-14 2.531250e-01 1.118813e-06 4.705784e-11 2.375080e-12 7.969647e-01

**********************************************************************************
Transient iteration: 41 Time: 8e-06 Time step: 1.88e-07 CFL: 1.01425e-06
**********************************************************************************
***********************************************************************************
Transient iteration: 41 Time: 8.012e-06 Time step: 2e-07 CFL: 1.01425e-06
***********************************************************************************
Temperature statistics on fluid:
Min: 298
Max: 1735.9
Average: 310.557
Std-Dev: 93.1306
Max: 1737.64
Average: 310.575
Std-Dev: 93.2514

----------------------
VOF Mass Conservation
----------------------
time surface_fluid_0 mass_per_length_fluid_0 momentum-x_fluid_0 momentum-y_fluid_0 surface_fluid_1 mass_per_length_fluid_1 momentum-x_fluid_1 momentum-y_fluid_1 sharpening_threshold
8.000000e-06 1.068750e-01 1.906650e-10 1.506384e-11 7.595926e-14 2.531250e-01 1.118813e-06 4.696548e-11 1.409740e-12 7.969647e-01
8.012000e-06 1.068750e-01 1.906650e-10 1.506322e-11 7.605316e-14 2.531250e-01 1.118813e-06 4.696060e-11 1.392207e-12 7.969647e-01
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ VOF Mass Conservation
time surface_fluid_0 mass_per_length_fluid_0 momentum-x_fluid_0 momentum-y_fluid_0 surface_fluid_1 mass_per_length_fluid_1 momentum-x_fluid_1 momentum-y_fluid_1 sharpening_threshold
6.412000e-06 1.026562e-01 1.831387e-10 1.565452e-11 4.479244e-14 2.573438e-01 1.137459e-06 2.576702e-12 2.965199e-10 5.000000e-01

*********************************************************************************
Transient iteration: 34 Time: 6.5e-06 Time step: 8.8e-08 CFL: 0.00271917
*********************************************************************************
**********************************************************************************
Transient iteration: 34 Time: 6.612e-06 Time step: 2e-07 CFL: 0.00271918
**********************************************************************************
Temperature statistics on fluid:
Min: 298
Max: 2110.78
Average: 306.603
Std-Dev: 80.8732
Max: 2125.57
Average: 306.736
Std-Dev: 81.7765

----------------------
VOF Mass Conservation
----------------------
time surface_fluid_0 mass_per_length_fluid_0 momentum-x_fluid_0 momentum-y_fluid_0 surface_fluid_1 mass_per_length_fluid_1 momentum-x_fluid_1 momentum-y_fluid_1 sharpening_threshold
6.500000e-06 1.026562e-01 1.831387e-10 1.570767e-11 7.192055e-14 2.573438e-01 1.137459e-06 4.142501e-12 2.074979e-10 5.000000e-01
6.612000e-06 1.026562e-01 1.831387e-10 1.625213e-11 1.196876e-13 2.573438e-01 1.137459e-06 1.027986e-11 3.396211e-10 5.000000e-01
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ Running on 1 MPI rank(s)...
*********************************************************************************
Transient iteration: 19 Time: 0.511589 Time step: 0.0555984 CFL: 0.0937518
*********************************************************************************
Enstrophy : 0.0686874
Kinetic energy : 0.0342889
Enstrophy: 0.0686874
Kinetic energy: 0.0342889

*********************************************************************************
Transient iteration: 20 Time: 0.572748 Time step: 0.0611582 CFL: 0.0927773
*********************************************************************************
Enstrophy : 0.0544932
Kinetic energy : 0.0272031
Enstrophy: 0.0544932
Kinetic energy: 0.0272031

*********************************************************************************
Transient iteration: 21 Time: 0.6 Time step: 0.0272524 CFL: 0.0909005
Transient iteration: 21 Time: 0.640022 Time step: 0.0672741 CFL: 0.0909005
*********************************************************************************
Enstrophy : 0.0489892
Kinetic energy : 0.0244555
Enstrophy: 0.0423024
Kinetic energy: 0.0211174
time error_velocity
0.0100 9.702604e-04
0.0210 1.497541e-03
Expand All @@ -47,4 +47,4 @@ Kinetic energy : 0.0244555
0.4560 4.412568e-02
0.5116 4.840382e-02
0.5727 5.242945e-02
0.6000 5.140802e-02
0.6400 5.603102e-02
Loading
Loading