Open hugary1995 opened 7 months ago
Job Documentation on 554b071 wanted to post the following:
View the site here
This comment will be updated on new commits.
Job Coverage on 554b071 wanted to post the following:
d0e3c6 | #117 554b07 | ||||
---|---|---|---|---|---|
Total | Total | +/- | New | ||
Rate | 68.98% | 71.41% | +2.43% | 82.86% | |
Hits | 1023 | 1284 | +261 | 261 | |
Misses | 460 | 514 | +54 | 54 |
This comment will be updated on new commits.
Just took a look at the coverage diff - could you also add some error checking tests? The majority of the diff is missing coverage on mooseError
calls.
close #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 vectorst
,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 forx
,y
andz
.Once a
SpatioTemporalPath
object is constructed, otherMooseObject
s can retrieve path given its name from the warehouse, through theSpatioTemporalPathInterface
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 methodPoint position(Real t) const
. Default implementations are provided forRealVectorValue velocity(Real t)
andRealVectorValue 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
andADMovingEllipsoidalHeatSource
SpatioTemporalPathElementSubdomainModifier
Their names are self-explanatory. Note that
ADMovingEllipsoidalHeatSource
makes use of the tangential and normal distance to effectively "rotate" the ellipsoidal heat source.