-
Notifications
You must be signed in to change notification settings - Fork 28
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
The Spatio-Temporal Path system #117
base: devel
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# AddSpatioTemporalPathAction | ||
|
||
This action registers objects derived from [`SpatioTemporalPath`](SpatioTemporalPath/index.md) into the current problem. See the linked page for more details on the usage of the `SpatioTemporalPath` system. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ADMovingEllipsoidalHeatSource | ||
|
||
!syntax description /Materials/ADMovingEllipsoidalHeatSource | ||
|
||
## Example Input File Syntax | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add example input file syntax for each of these documentation files, for those objects present in the added tests. This applies to all the new documentation files except for the action and system pages. |
||
|
||
!syntax parameters /Materials/ADMovingEllipsoidalHeatSource | ||
|
||
!syntax inputs /Materials/ADMovingEllipsoidalHeatSource | ||
|
||
!syntax children /Materials/ADMovingEllipsoidalHeatSource |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# CSVPiecewiseLinearSpatioTemporalPath | ||
|
||
!syntax description /UserObjects/CSVPiecewiseLinearSpatioTemporalPath | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /UserObjects/CSVPiecewiseLinearSpatioTemporalPath | ||
|
||
!syntax inputs /UserObjects/CSVPiecewiseLinearSpatioTemporalPath | ||
|
||
!syntax children /UserObjects/CSVPiecewiseLinearSpatioTemporalPath |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# FunctionSpatioTemporalPath | ||
|
||
!syntax description /UserObjects/FunctionSpatioTemporalPath | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /UserObjects/FunctionSpatioTemporalPath | ||
|
||
!syntax inputs /UserObjects/FunctionSpatioTemporalPath | ||
|
||
!syntax children /UserObjects/FunctionSpatioTemporalPath |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# PiecewiseLinearSpatioTemporalPath | ||
|
||
!syntax description /UserObjects/PiecewiseLinearSpatioTemporalPath | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /UserObjects/PiecewiseLinearSpatioTemporalPath | ||
|
||
!syntax inputs /UserObjects/PiecewiseLinearSpatioTemporalPath | ||
|
||
!syntax children /UserObjects/PiecewiseLinearSpatioTemporalPath |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SpatioTemporalPathElementSubdomainModifier | ||
|
||
!syntax description /UserObjects/SpatioTemporalPathElementSubdomainModifier | ||
|
||
## Example Input File Syntax | ||
|
||
!syntax parameters /UserObjects/SpatioTemporalPathElementSubdomainModifier | ||
|
||
!syntax inputs /UserObjects/SpatioTemporalPathElementSubdomainModifier | ||
|
||
!syntax children /UserObjects/SpatioTemporalPathElementSubdomainModifier |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,32 @@ | ||||||||||||||||||||||
# SpatioTemporalPath System | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More of a general comment/question - have you thought about (or do you see) this system being applied to some of our current laser melting and laser welding examples? I wonder if there's some quality of life updates to be made in some of these older examples after this goes in.... |
||||||||||||||||||||||
|
||||||||||||||||||||||
The SpatioTemporalPath system offers flexible ways of defining spatio-temporal paths, hereinafter referred to as paths, that are often useful in additive manufacturing simulations. | ||||||||||||||||||||||
|
||||||||||||||||||||||
## Overview | ||||||||||||||||||||||
|
||||||||||||||||||||||
A spatio-temporal path is a vector-valued function of time, written as | ||||||||||||||||||||||
|
||||||||||||||||||||||
\begin{equation} | ||||||||||||||||||||||
\begin{aligned} | ||||||||||||||||||||||
\boldsymbol{x} = f(t) | ||||||||||||||||||||||
\end{aligned} | ||||||||||||||||||||||
\end{equation} | ||||||||||||||||||||||
|
||||||||||||||||||||||
where $\boldsymbol{x}$ is the path front at time $t$. In addition to the path front, the path object also defines the path's moving velocity $\boldsymbol{v}$ and the path's moving direction $\boldsymbol{t}$, defined as | ||||||||||||||||||||||
|
||||||||||||||||||||||
\begin{equation} | ||||||||||||||||||||||
\begin{aligned} | ||||||||||||||||||||||
\boldsymbol{v} &= \dfrac{\boldsymbol{x}}{t} | ||||||||||||||||||||||
\boldsymbol{t} &= \dfrac{\boldsymbol{v}}{\lVert\boldsymbol{v}\rVert} | ||||||||||||||||||||||
\end{aligned} | ||||||||||||||||||||||
\end{equation} | ||||||||||||||||||||||
|
||||||||||||||||||||||
## Example Input File Syntax | ||||||||||||||||||||||
|
||||||||||||||||||||||
Spatio-temporal paths are defined under the `[SpatioTemporalPaths]` in the input file and can be referenced by other objects in the input file. | ||||||||||||||||||||||
|
||||||||||||||||||||||
!syntax list /SpatioTemporalPath objects=True actions=False subsystems=False | ||||||||||||||||||||||
|
||||||||||||||||||||||
!syntax list /SpatioTemporalPath objects=False actions=False subsystems=True | ||||||||||||||||||||||
|
||||||||||||||||||||||
!syntax list /SpatioTemporalPath objects=False actions=True subsystems=False | ||||||||||||||||||||||
Comment on lines
+28
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/****************************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* */ | ||
/* MALAMUTE: MOOSE Application Library for Advanced Manufacturing UTilitiEs */ | ||
/* */ | ||
/* Copyright 2021 - 2023, Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include "MooseObjectAction.h" | ||
|
||
/** | ||
* Add SpatioTemporalPath | ||
*/ | ||
class AddSpatioTemporalPathAction : public MooseObjectAction | ||
{ | ||
public: | ||
AddSpatioTemporalPathAction(const InputParameters & params); | ||
|
||
static InputParameters validParams(); | ||
|
||
void act() override final; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/****************************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* */ | ||
/* MALAMUTE: MOOSE Application Library for Advanced Manufacturing UTilitiEs */ | ||
/* */ | ||
/* Copyright 2021 - 2023, Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include "MooseTypes.h" | ||
#include "InputParameters.h" | ||
|
||
class FEProblemBase; | ||
class InputParameters; | ||
class MooseObject; | ||
class SpatioTemporalPath; | ||
|
||
/** | ||
* Interface for objects that need to use SpatioTemporalPath | ||
*/ | ||
class SpatioTemporalPathInterface | ||
{ | ||
public: | ||
SpatioTemporalPathInterface(const MooseObject * moose_object); | ||
|
||
/** | ||
* Get a SpatioTemporalPath with a given name | ||
* @param name The name of the parameter key of the SpatioTemporalPath to retrieve | ||
* @return The SpatioTemporalPath with name associated with the parameter 'name' | ||
*/ | ||
const SpatioTemporalPath & getSpatioTemporalPath(const std::string & name) const; | ||
|
||
/** | ||
* Get a SpatioTemporalPath with a given name | ||
* @param name The name of the SpatioTemporalPath to retrieve | ||
* @return The SpatioTemporalPath with name 'name' | ||
*/ | ||
const SpatioTemporalPath & getSpatioTemporalPathByName(const std::string & name) const; | ||
|
||
private: | ||
/// Parameters of the object with this interface | ||
const InputParameters & _stpi_params; | ||
|
||
/// Reference to FEProblemBase instance | ||
FEProblemBase & _stpi_feproblem; | ||
|
||
/// Thread ID | ||
const THREAD_ID _stpi_tid; | ||
}; |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,37 @@ | ||||||
/****************************************************************************/ | ||||||
/* DO NOT MODIFY THIS HEADER */ | ||||||
/* */ | ||||||
/* MALAMUTE: MOOSE Application Library for Advanced Manufacturing UTilitiEs */ | ||||||
/* */ | ||||||
/* Copyright 2021 - 2023, Battelle Energy Alliance, LLC */ | ||||||
/* ALL RIGHTS RESERVED */ | ||||||
/****************************************************************************/ | ||||||
|
||||||
#pragma once | ||||||
|
||||||
#include "ADMovingHeatSource.h" | ||||||
|
||||||
/** | ||||||
* @brief A moving ellipsoidal heat source following a SpatioTemporalPath | ||||||
*/ | ||||||
class ADMovingEllipsoidalHeatSource : public ADMovingHeatSource | ||||||
{ | ||||||
public: | ||||||
static InputParameters validParams(); | ||||||
|
||||||
ADMovingEllipsoidalHeatSource(const InputParameters & parameters); | ||||||
|
||||||
protected: | ||||||
virtual ADReal computeHeatSource() override; | ||||||
|
||||||
/// Input power | ||||||
const ADMaterialProperty<Real> & _P; | ||||||
/// Length of the ellipsoid semi-axis along the path direction | ||||||
const ADMaterialProperty<Real> & _a; | ||||||
/// Length of the ellipsoid semi-axis perpendicular to the path direction | ||||||
const ADMaterialProperty<Real> & _b; | ||||||
/// Process efficienty | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
const Real _eta; | ||||||
/// Scaling factor | ||||||
const Real _scale; | ||||||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/****************************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* */ | ||
/* MALAMUTE: MOOSE Application Library for Advanced Manufacturing UTilitiEs */ | ||
/* */ | ||
/* Copyright 2021 - 2023, Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include "Material.h" | ||
#include "SpatioTemporalPath.h" | ||
#include "SpatioTemporalPathInterface.h" | ||
|
||
/** | ||
* @brief A moving heat source following a SpatioTemporalPath | ||
*/ | ||
class ADMovingHeatSource : public Material, public SpatioTemporalPathInterface | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
ADMovingHeatSource(const InputParameters & parameters); | ||
|
||
protected: | ||
virtual void computeQpProperties() override; | ||
virtual ADReal computeHeatSource() = 0; | ||
|
||
/// The path | ||
const SpatioTemporalPath & _path; | ||
|
||
/// The heat source | ||
ADMaterialProperty<Real> & _volumetric_heat; | ||
|
||
/// Tangential distance from the heat source | ||
MaterialProperty<Real> & _tangential_distance; | ||
|
||
/// Normal distance from the heat source | ||
MaterialProperty<Real> & _normal_distance; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/****************************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* */ | ||
/* MALAMUTE: MOOSE Application Library for Advanced Manufacturing UTilitiEs */ | ||
/* */ | ||
/* Copyright 2021 - 2023, Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include "PiecewiseLinearSpatioTemporalPathBase.h" | ||
|
||
/** | ||
* @brief Construct a piecewise linear path from a csv file | ||
* | ||
*/ | ||
class CSVPiecewiseLinearSpatioTemporalPath : public PiecewiseLinearSpatioTemporalPathBase | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
CSVPiecewiseLinearSpatioTemporalPath(const InputParameters & params); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/****************************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* */ | ||
/* MALAMUTE: MOOSE Application Library for Advanced Manufacturing UTilitiEs */ | ||
/* */ | ||
/* Copyright 2021 - 2023, Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include "SpatioTemporalPath.h" | ||
|
||
class Function; | ||
|
||
/** | ||
* @brief A spatiotemporal path whose coordinates are specified using MOOSE functions. | ||
*/ | ||
class FunctionSpatioTemporalPath : public SpatioTemporalPath | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
FunctionSpatioTemporalPath(const InputParameters & params); | ||
|
||
virtual Point position(Real t) const override; | ||
|
||
protected: | ||
/// The function for the x-coordinate | ||
const Function * _x; | ||
/// The function for the y-coordinate | ||
const Function * _y; | ||
/// The function for the z-coordinate | ||
const Function * _z; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/****************************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* */ | ||
/* MALAMUTE: MOOSE Application Library for Advanced Manufacturing UTilitiEs */ | ||
/* */ | ||
/* Copyright 2021 - 2023, Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include "PiecewiseLinearSpatioTemporalPathBase.h" | ||
|
||
/** | ||
* @brief Construct a piecewise linear spatiotemporal path from discrete times and vertices. | ||
*/ | ||
class PiecewiseLinearSpatioTemporalPath : public PiecewiseLinearSpatioTemporalPathBase | ||
{ | ||
public: | ||
static InputParameters validParams(); | ||
|
||
PiecewiseLinearSpatioTemporalPath(const InputParameters & params); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.