Skip to content

How to generate, Exact time-based Outputs #475

@ravi-srs

Description

@ravi-srs

Bug Description

I am using MASTODON with adaptive time stepping (IterationAdaptiveDT). I would like to write Outputs (CSV and Exodus) at exact wall‑clock times, e.g. every 0.01 s , regardless of timestep cutbacks.
Mastodon seem to not support the [Times] framework, TimeIntervalTimes, or Output‑level time synchronization (sync_times_object, sync_only, time_interval), making exact time‑aligned Outputs impossible when adaptive dt is enabled.

Steps to Reproduce

[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor -snes_monitor'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter -pc_hypre_boomeramg_strong_threshold -pc_hypre_boomeramg_agg_nl -pc_hypre_boomeramg_agg_num_paths -pc_hypre_boomeramg_coarsen_type -pc_hypre_boomeramg_interp_type -pc_hypre_boomeramg_truncfactor -snes_linesearch_type -snes_lag_jacobian -snes_type -snes_linesearch_maxlambda -snes_linesearch_max_it -snes_linesearch_damping'
petsc_options_value = '200 hypre boomeramg 2 0.6 2 2 PMIS ext+i 0.4 l2 2 newtonls 0.5 5 0.8'

l_tol = 1e-4
nl_rel_tol = 5e-4
nl_abs_tol = 5e-4
nl_max_its = 100
start_time = 0.0
end_time = 11.0
dtmax = 0.001
dtmin = 1e-6

[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-4
cutback_factor = 0.5
growth_factor = 1.25
time_interval = 0.01
[]

[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]

[Times]
[output_times]
type = TimeIntervalTimes
time_interval = 0.01
[]
[]

[]

[Outputs]
exodus = true

[solution_csv]
type = CSV
file_base = solution_monitor
execute_on = TIMESTEP_END
show = 'nl_iters current_time'
sync_only = true
sync_times_object = output_times

[]
[]

Error##

section '[Executioner/Times]' does not have an associated Action; you likely misspelled the Action/section name or the app you are running does not support this Action/syntax
section '[Executioner/Times/output_times]' does not have an associated Action; you likely misspelled the Action/section name or the app you are running does not support this Action/syntax

Installed version

*** Deprecation Warning ***
MooseApp::addCapability() is deprecated (adding capability 'neml'); use one of MooseApp::add[Bool,Int,String]Capability instead.
Stack frames: 8
0: libMesh::print_trace(std::ostream&)
1: void moose::internal::mooseDeprecatedStream<libMesh::BasicOStreamProxy<char, std::char_traits >, char const (&) [61], std::basic_string_view<char, std::char_traits > const&, char const (&) [65]>(libMesh::BasicOStreamProxy<char, std::char_traits >&, bool, bool, char const (&) [61], std::basic_string_view<char, std::char_traits > const&, char const (&) [65])
2: MooseApp::addCapability(std::basic_string_view<char, std::char_traits >, std::variant<bool, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > const&, std::basic_string_view<char, std::char_traits >)
3: BlackBearApp::registerApps()
4: /home/subbarar/software/mastodon/mastodon-opt(+0x507d) [0x559f68ff207d]
5: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fb31f8dad90]
6: __libc_start_main
7: /home/subbarar/software/mastodon/mastodon-opt(+0x535e) [0x559f68ff235e]

*** Deprecation Warning ***
In /data2/subbarar/software/mastodon/src/base/MastodonApp.C:
registerDataFilePath() is deprecated. Use registerAppDataFilePath("mastodon") instead.
Stack frames: 15
0: libMesh::print_trace(std::ostream&)
1: void moose::internal::mooseDeprecatedStream<libMesh::BasicOStreamProxy<char, std::char_traits >, char const (&) [4], std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const (&) [70], std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const (&) [12]>(libMesh::BasicOStreamProxy<char, std::char_traits >&, bool, bool, char const (&) [4], std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const (&) [70], std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const (&) [12])
2: Registry::addDeprecatedAppDataFilePath(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
3: MastodonApp::registerAll(Factory&, ActionFactory&, Syntax&)
4: MastodonTestApp::registerAll(Factory&, ActionFactory&, Syntax&, bool)
5: MastodonTestApp::MastodonTestApp(InputParameters)
6: /data2/subbarar/software/mastodon/test/lib/libmastodon_test-opt.so.0(+0x38e9d) [0x7fb334ff2e9d]
7: /data2/subbarar/software/mastodon/test/lib/libmastodon_test-opt.so.0(+0x38f31) [0x7fb334ff2f31]
8: AppFactory::create(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, InputParameters, int)
9: AppFactory::create(std::unique_ptr<Parser, std::default_delete >, std::unique_ptr<CommandLine, std::default_delete >)
10: Moose::createMooseApp(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, char**)
11: /home/subbarar/software/mastodon/mastodon-opt(+0x50d7) [0x559f68ff20d7]
12: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fb31f8dad90]
13: __libc_start_main
14: /home/subbarar/software/mastodon/mastodon-opt(+0x535e) [0x559f68ff235e]

Impact

Output file is becoming very large , i want to match to input resolution and due to high non-linearity (contact) the cutback and dt is very low. The only option was to use interval = 100 (example) but that can sometime missing the peak responses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions