Skip to content

Commit

Permalink
Address review comments. (#28200)
Browse files Browse the repository at this point in the history
  • Loading branch information
grmnptr committed Dec 7, 2024
1 parent 1aafa7d commit e94c16b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ The reference results are filtered to show the melt pool shape. We see that for
steel melts, but no displacement is visible due to little to no evaporation. On the other hand, the
increase in laser power results in an increased evaporation resulting in significant surface deformation.

!media combined/laser_weld/60.png caption=Problem setup for the laser melt pool simulation id=fig:result-60 style=width:100%
!media combined/laser_weld/60.png caption=Simulation results at the final time step with laser power ($60~W$) and wide effective laser radius ($155~\mu m$) id=fig:result-60 style=width:100%

!media combined/laser_weld/74.png caption=Problem setup for the laser melt pool simulation id=fig:result-74 style=width:100%
!media combined/laser_weld/74.png caption=Simulation results at the final time step with laser power ($74~W$) and narrow effective laser radius ($125~\mu m$) id=fig:result-74 style=width:100%

## Training the reduced-order model

Expand All @@ -96,7 +96,7 @@ parts in the transfer and reporter blocks.
!listing examples/stochastic/laser_welding_dimred/train.i caption=Transfers and Reporters needed for snapshot collection block=Transfers Reporters VariableMappings remove=Reporters/matrix Reporters/svd id=list:training-trans-rep

With the snapshots all available in one place, we can extract the POD modes
necessary for the dimensionality reduction. This is dones using the
necessary for the dimensionality reduction. This is done using the
[PODMapping.md] reporter which not only creates the decomposition but also maps the
created snapshots onto a low-dimensional latent space.

Expand Down Expand Up @@ -161,7 +161,7 @@ in the 0-0.2% interval.


!plot histogram
id=test-results caption=Historgram of the L2 errors over the 90 test samples.
id=test-results caption=Histogram of the L2 errors over the 90 test samples.
filename=examples/stochastic/laser_welding_dimred/gold/error_to_plot.csv
data=[{'x':'l2error', 'name':'L2 Error'}]
layout={'xaxis':{'type':'linear', 'title':'Relative L2 Error'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ where $\mathcal{H}$ is the mean curvature of the surface, while
$\sigma$ describes the suface tension. In this context, $\nabla_s = (I-\vec{n}\vec{n})\cdot \nabla$
is the surface gradient operator. Parameter [!param](/BCs/INSADSurfaceTensionBC/include_gradient_terms)
can be used to enable or disable the second term in the expression.
Disabling the second term would disable the MArangoni effect and would decrease the
Disabling the second term would disable the Marangoni effect and would decrease the
surface deformations. This decreases the fidelity of the model, with an increased robustness.
The model is based on the one discussed in [!cite](cairncross2000finite).

!syntax description /BCs/INSADSurfaceTensionBC

!syntax parameters /BCs/INSADSurfaceTensionBC

!syntax inputs /BCs/INSADSurfaceTensionBC
Expand Down
4 changes: 4 additions & 0 deletions modules/navier_stokes/include/bcs/INSADSurfaceTensionBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@ class INSADSurfaceTensionBC : public ADVectorIntegratedBC
/// If the surface tension should include the gradient terms
/// (increases fidelity, decreases stability)
const bool _include_gradient_terms;

/// Curvature force multiplier. The reason behind this is that
/// libmesh has a different sign convention for 2D and 3D.
const Real _curvature_factor;
};
8 changes: 5 additions & 3 deletions modules/navier_stokes/src/bcs/INSADSurfaceTensionBC.C
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ INSADSurfaceTensionBC::INSADSurfaceTensionBC(const InputParameters & parameters)
_surface_term_curvature(getADMaterialProperty<RealVectorValue>("surface_term_curvature")),
_surface_term_gradient1(getADMaterialProperty<RealVectorValue>("surface_term_gradient1")),
_surface_term_gradient2(getADMaterialProperty<RealVectorValue>("surface_term_gradient2")),
_include_gradient_terms(getParam<bool>("include_gradient_terms"))
_include_gradient_terms(getParam<bool>("include_gradient_terms")),
_curvature_factor(_subproblem.mesh().dimension() == 3 ? 1.0 : -1.0)
{
}

ADReal
INSADSurfaceTensionBC::computeQpResidual()
{
auto force = _surface_term_curvature[_qp];
auto force = _curvature_factor * _surface_term_curvature[_qp];

if (_include_gradient_terms)
force += _surface_term_gradient1[_qp] + _surface_term_gradient2[_qp];
return _test[_i][_qp] * force;
return -_test[_i][_qp] * force;
}

0 comments on commit e94c16b

Please sign in to comment.