A Modular action for moving heat source simulation#417
Open
ChengHauYang wants to merge 7 commits into
Open
Conversation
close idaholab#116 This PR adds a new system associated with the syntax block `[SpatioTemporalPaths]`. Multiple SpatioTemporalPath-derived objects can be added under that syntax block. I have implemented 3 objects so far: - `PiecewiseLinearSpatioTemporalPath`: This one accepts input file vectors `t`, `x`, `y`, `z` and constructs a spatio-temporal path object. - `CSVPiecewiseLinearSpatioTemporalPath`: This one is similar to the previous one but instead reads from a csv file. - `FunctionSpatioTemporalPath`: This one accepts moose functions for `x`, `y` and `z`. Once a `SpatioTemporalPath` object is constructed, other `MooseObject`s can retrieve path given its name from the warehouse, through the `SpatioTemporalPathInterface` interface. See e.g. `ADMovingHeatSource` for how that coupling works. Each spatio-temporal path objects recomputes several path-related information at every time step: - `SpatioTemporalPath::position()` returns the current path front. - `SpatioTemporalPath::velocity()` returns the current path moving velocity. - `SpatioTemporalPath::direction()` returns the current path direction. Variants of the above methods exist which accepts a time and computes the corresponding path information at the specified time. By default the path-related information is recomputed at every time step, i.e. the path information is "live". The users have control over how often the path-related information is updated by the parameter `update_interval`. There are also methods that retrieve the path-related information from the previous update: - `SpatioTemporalPath::previousPosition()` - `SpatioTemporalPath::previousVelocity()` - `SpatioTemporalPath::previousDirection()` An object deriving from `SpatioTemporalPath` only need to override one single method `Point position(Real t) const`. Default implementations are provided for `RealVectorValue velocity(Real t)` and `RealVectorValue direction(Real t)` which use finite-differencing to compute the derivatives. The developer can optionally override these methods to provide more efficient/accurate implementations. Utility methods are provided to compute the tangential and normal components of the distance between a given point and the path's current position. - `SpatioTemporalPath::tangentialDistance(const Point & p)` - `SpatioTemporalPath::normalDistance(const Point & p)` Similarly, variants of the above methods exist which additionally accepts a specified time. Spatio-temporal paths are useful in many scenarios. I have added two concrete examples for demonstration purposes: - `ADMovingHeatSource` and `ADMovingEllipsoidalHeatSource` - `SpatioTemporalPathElementSubdomainModifier` Their names are self-explanatory. Note that `ADMovingEllipsoidalHeatSource` makes use of the tangential and normal distance to effectively "rotate" the ellipsoidal heat source.
…Bear - Updated all headers and object registrations to use BlackBearApp instead of MalamuteApp - Replaced copyright/license headers accordingly
Fixs the logic used to determine the active time interval by replacing the previous "first t >= time[i]" check with a proper tolerance-based interval search. This resolves incorrect early returns and ensures consistent behavior for boundary and out-of-range queries.
43df903 to
a137392
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #416
To enhance user-friendliness and improve the convergence of welding simulations, we introduce the following implementations:
Items (1) and (2) build upon existing pull requests in MOOSE, while item (3) is implemented in BlackBear.
Details of the Welding Simulation Action
This new Action allows users to simply specify a few parameters to automatically:
The key components are:
CSVPiecewiseLinearSpatioTemporalPathDefines the time-dependent path of the moving heat source based on a CSV input file.
This user object interpolates the source location over time for accurate path tracking.
SpatioTemporalPathElementSubdomainModifierDynamically modifies element subdomains within a specified distance from the moving path,
allowing for material activation.
ADMatHeatSourceInserts the volumetric heat source term into the weak form of the heat equation and
couples it to the temperature field variable.
ADMovingEllipsoidalHeatSourceProvides an ellipsoidal volumetric heat source centered around the current path position,
capturing spatial heating effects.
Reference:
OSTI: 2583685