diff --git a/doc/source/examples/multiphysics/heat-transfer.rst b/doc/source/examples/multiphysics/heat-transfer.rst index 1988a6066f..d4251c2428 100644 --- a/doc/source/examples/multiphysics/heat-transfer.rst +++ b/doc/source/examples/multiphysics/heat-transfer.rst @@ -11,6 +11,5 @@ Heat Transfer stefan-problem/stefan-problem warming-up-a-viscous-fluid/warming-up-a-viscous-fluid melting-cavity/melting-cavity - laser-heating/laser-heating - laser-melt-pool/laser-melt-pool + static-irradiation/static-irradiation concentric-heat-exchanger/concentric-heat-exchanger diff --git a/doc/source/examples/multiphysics/laser-heating/images/geometry.png b/doc/source/examples/multiphysics/laser-heating/images/geometry.png deleted file mode 100644 index 0575e501eb..0000000000 Binary files a/doc/source/examples/multiphysics/laser-heating/images/geometry.png and /dev/null differ diff --git a/doc/source/examples/multiphysics/laser-heating/laser-heating.rst b/doc/source/examples/multiphysics/laser-heating/laser-heating.rst deleted file mode 100644 index 70a82c9832..0000000000 --- a/doc/source/examples/multiphysics/laser-heating/laser-heating.rst +++ /dev/null @@ -1,197 +0,0 @@ -========================== -Laser Heating -========================== - -This example simulates a three-dimensional solid block heated with a laser beam which follows a complex path. This mimics an additive manufacturing process. - - ----------------------------------- -Features ----------------------------------- - -- Solver: ``lethe-fluid`` -- Laser heat source -- Convection-radiation heat transfer boundary condition -- Unsteady problem handled by an adaptive BDF2 time-stepping scheme -- Time-dependent laser path -- Mesh adaptation using temperature - - ---------------------------- -Files Used in This Example ---------------------------- - -- Parameter file: ``examples/multiphysics/laser-heating/laser-heating.prm`` - - ------------------------------ -Description of the Case ------------------------------ - -A laser beam heats a three-dimensional solid block. The laser beam is emitted perpendicular to the top surface of the block in the negative z direction. The following schematic describes the geometry and dimensions of block and laser beam: - -.. image:: images/geometry.png - :alt: Schematic - :align: center - :width: 400 - -The laser path changes with time. The laser beam radius and penetration depth are both set to :math:`0.00005` m. Because of this small radius and penetration depth, we use adaptive mesh refinement based on the temperature. Thermal boundary conditions are ``convection-radiation-flux`` with a convective heat transfer coefficient of 5 and an emissivity of 0.4. The corresponding parameter file is: -``laser-heating.prm``. - - --------------- -Parameter File --------------- - -Time integration is handled by a 2nd order backward differentiation scheme `(bdf2)` (for a better temporal accuracy), for a :math:`0.003` seconds simulation time with a constant -time step of :math:`5.0 \times 10^{-5}` seconds. - - -Simulation Control -~~~~~~~~~~~~~~~~~~ - -.. code-block:: text - - subsection simulation control - set method = bdf2 - set time end = 0.003 - set time step = 0.00005 - set output name = laser-heating - set output frequency = 1 - set output path = ./output/ - set subdivision = 1 - end - -Boundary Conditions -~~~~~~~~~~~~~~~~~~~ - -All the boundary conditions are ``noslip``, and the heat transfer boundary conditions are ``convection-radiation-flux``. - -.. code-block:: text - - subsection boundary conditions - set number = 1 - subsection bc 0 - set type = noslip - end - end - subsection boundary conditions heat transfer - set number = 1 - subsection bc 0 - set type = convection-radiation-flux - subsection h - set Function expression = 5 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.4 - end - end - end - -Multiphysics -~~~~~~~~~~~~ - -The ``multiphysics`` subsection enables to turn on (``true``) and off (``false``) the physics of interest. Here only ``heat transfer`` is enabled. - - -.. code-block:: text - - subsection multiphysics - set heat transfer = true - end - - -Laser Parameters -~~~~~~~~~~~~~~~~ - -In the ``laser parameters`` section, the parameters of the laser model are defined. The exponential decaying model `[1] `_ is used to simulate the laser heat source. In the exponential decaying model, the laser heat flux is calculated using the following equation: - -.. math:: - q(x,y,z) = \frac{\eta \alpha P}{\pi r^2 \mu} \exp{\left(-\eta \frac{r^2}{R^2}\right)} \exp{\left(- \frac{|z|}{\mu}\right)} - - -where :math:`\eta`, :math:`\alpha`, :math:`P`, :math:`R`, :math:`\mu`, :math:`r` and :math:`z` denote concentration factor, absorptivity, laser power, beam radius, penetration depth, radial distance from the laser focal point, and axial distance from the laser focal point, respectively. These parameters are explained in more detail in the `laser parameters `_. - - -.. note:: - The scanning path of the laser is defined using a Function expression in the ``path`` subsection. Here the laser ``path`` is a function of time, and changes its direction twice during laser operation. - - -.. code-block:: text - - subsection laser parameters - set enable = true - set type = exponential_decay - set concentration factor = 50 - set power = 3 - set absorptivity = 0.6 - set penetration depth = 0.00005 - set beam radius = 0.00005 - set start time = 0 - set end time = 0.003 - set beam orientation = z- - subsection path - set Function expression = if(t<0.001, 0.5 * t, if(t<0.002, 0.0005, if(t<0.003 , 0.0005-0.5 * (t-0.002), -1))); if(t<0.001, 0.00025, if(t < 0.002, 0.00025 - 0.5 * (t-0.001) , if(t < 0.003 , -0.00025, -1))) ; 0.0003 - end - end - -Mesh Adaptation -~~~~~~~~~~~~~~~ - -In the ``mesh adaptation`` subsection, we choose a mesh refinement based on the variable ``temperature``. Mesh adaptation is explained in more detail in `mesh adaptation control `_ - - -.. code-block:: text - - subsection mesh adaptation - set type = kelly - set variable = temperature - set fraction type = fraction - set max refinement level = 4 - set min refinement level = 0 - set frequency = 1 - set fraction refinement = 0.5 - set fraction coarsening = 0.2 - end - - ----------------------- -Running the Simulation ----------------------- - -Call the lethe-fluid by invoking: - -.. code-block:: text - :class: copy-button - - mpirun -np 8 lethe-fluid laser-heating.prm - -to run the simulation using eight CPU cores. Feel free to use more. - - -.. warning:: - Make sure to compile lethe in `Release` mode and - run in parallel using mpirun. This simulation takes - :math:`\approx` 5 minutes on 8 processes. - - -------- -Results -------- - -The following animation shows the temperature distribution in the simulations domain, as well the laser path. - -.. raw:: html - - - - --------------------------- -Possibility for Extension --------------------------- - -This example can be extended to implement phase change (melting the solid block by laser and solidifying again after cooling). - diff --git a/doc/source/examples/multiphysics/laser-melt-pool/images/laser-phasechange.png b/doc/source/examples/multiphysics/laser-melt-pool/images/laser-phasechange.png deleted file mode 100644 index bba8e02293..0000000000 Binary files a/doc/source/examples/multiphysics/laser-melt-pool/images/laser-phasechange.png and /dev/null differ diff --git a/doc/source/examples/multiphysics/laser-melt-pool/laser-melt-pool.rst b/doc/source/examples/multiphysics/laser-melt-pool/laser-melt-pool.rst deleted file mode 100644 index 401669d4dd..0000000000 --- a/doc/source/examples/multiphysics/laser-melt-pool/laser-melt-pool.rst +++ /dev/null @@ -1,311 +0,0 @@ -========================== -Laser Melt Pool -========================== - -This example simulates a two-dimensional melt pool with a laser [#li2022]_. - - ----------------------------------- -Features ----------------------------------- - -- Solver: ``lethe-fluid`` -- Laser heat source -- Phase change (solid-liquid) -- Buoyant force (natural convection) -- Convection-radiation heat transfer boundary condition -- Unsteady problem handled by an adaptive BDF2 time-stepping scheme -- Mesh adaptation using temperature - - ---------------------------- -Files Used in This Example ---------------------------- - -- Parameter file: ``examples/multiphysics/laser-melt-pool/laser-melt-pool.prm`` - - ------------------------------ -Description of the Case ------------------------------ - -A Ti-6Al-4 V powder bed (assumed as a solid block in this example) melts using a laser beam that is emitted perpendicular to the top surface of the block. The laser beam speed is 0.5 m/s. Due to the laser heat source, the solid block melts in the direction of the laser. The corresponding parameter file is -``laser-melt-pool.prm``. - -The following schematic describes the geometry and dimensions of the simulation in the :math:`(x,y)` plane: - -.. image:: images/laser-phasechange.png - :alt: Schematic - :align: center - :width: 400 - - --------------- -Parameter File --------------- - -Time integration is handled by a 2nd order backward differentiation scheme -`(bdf2)` (for a better temporal accuracy), for a :math:`0.005` seconds simulation time with a constant -time step of :math:`5.0 \times 10^{-6}` seconds. - - -Simulation Control -~~~~~~~~~~~~~~~~~~ - -.. code-block:: text - - subsection simulation control - set method = bdf2 - set time end = 0.005 - set time step = 0.000005 - set output name = laser-melt-pool - set output frequency = 1 - set output path = ./output/ - end - - -Boundary Conditions -~~~~~~~~~~~~~~~~~~~ - -All the four boundary conditions are ``noslip``, and the heat transfer boundary conditions are ``convection-radiation-flux`` with a convective heat transfer coefficient of 80 :math:`\text{W}\text{m}^{-2}\text{K}^{-1}`, ambient temperature is 20 :math:`^{\circ}\text{C}`, and emissivity is 0.6. - -.. code-block:: text - - subsection boundary conditions - set number = 4 - subsection bc 0 - set id = 0 - set type = noslip - end - subsection bc 1 - set id = 1 - set type = noslip - end - subsection bc 2 - set id = 2 - set type = noslip - end - subsection bc 3 - set id = 3 - set type = noslip - end - end - subsection boundary conditions heat transfer - set number = 4 - subsection bc 0 - set id = 0 - set type = convection-radiation-flux - subsection h - set Function expression = 80 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.6 - end - end - subsection bc 1 - set id = 1 - set type = convection-radiation-flux - subsection h - set Function expression = 80 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.6 - end - end - subsection bc 2 - set id = 2 - set type = convection-radiation-flux - subsection h - set Function expression = 80 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.6 - end - end - subsection bc 3 - set id = 3 - set type = convection-radiation-flux - subsection h - set Function expression = 80 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.6 - end - end - end - - -Multiphysics -~~~~~~~~~~~~ - -The ``multiphysics`` subsection enables to turn on (``true``) and off (``false``) the physics of interest. Here ``heat transfer``, ``buoyancy force``, and ``fluid dynamics`` are enabled. - - -.. code-block:: text - - subsection multiphysics - set heat transfer = true - set buoyancy force = true - set fluid dynamics = true - end - - -Laser Parameters -~~~~~~~~~~~~~~~~ - -In the ``laser parameters`` section, the parameters of the laser model are defined. The exponential decaying model [#liu2018]_ is used to simulate the laser heat source. In the exponential decaying model, the laser heat flux is calculated using the following equation: - -.. math:: - q(x,y,z) = \frac{\eta \alpha P}{\pi r^2 \mu} \exp{\left(-\eta \frac{r^2}{R^2}\right)} \exp{\left(- \frac{|z|}{\mu}\right)} - - -where :math:`\eta`, :math:`\alpha`, :math:`P`, :math:`R`, :math:`\mu`, :math:`r` and :math:`z` denote concentration factor, absorptivity, laser power, beam radius, penetration depth, radial distance from the laser focal point, and axial distance from the laser focal point, respectively. These parameters are explained in more detail in `laser parameters `_. - - -.. note:: - The scanning path of the laser is defined using a Function expression in the ``path`` subsection. - - -.. code-block:: text - - subsection laser parameters - set enable = true - set type = exponential_decay - set concentration factor = 2 - set power = 100 - set absorptivity = 0.6 - set penetration depth = 0.000070 - set beam radius = 0.000050 - set start time = 0 - set end time = 0.001 - set beam orientation = y- - subsection path - set Function expression = 0.5 * t; 0.000500 - end - end - - -Physical Properties -~~~~~~~~~~~~~~~~~~~ - -The laser heat source locally melts the material, which is initially in the solid phase according to the definition of the ``solidus temperature``. Hence, the physical properties should be defined using ``phase_change`` models. Interested readers may find more information on phase change model in the `Stefan problem example `_ . In the ``physical properties`` subsection, the physical properties of the different phases of the fluid are defined: - - -.. code-block:: text - - subsection physical properties - set number of fluids = 1 - subsection fluid 0 - set thermal conductivity model = phase_change - set thermal expansion model = phase_change - set rheological model = phase_change - set specific heat model = phase_change - - set density = 4420 - - subsection phase change - # Enthalpy of the phase change - set latent enthalpy = 286000 - - # Temperature of the liquidus - set liquidus temperature = 1650 - - # Temperature of the solidus - set solidus temperature = 1604 - - # Specific heat of the liquid phase - set specific heat liquid = 831 - - # Specific heat of the solid phase - set specific heat solid = 670 - - # Kinematic viscosity of the liquid phase - set viscosity liquid = 0.00000069 - - # Kinematic viscosity of the solid phase - set viscosity solid = 0.008 - - set thermal conductivity solid = 33.4 - set thermal conductivity liquid = 10.6 - - set thermal expansion liquid = 0.0002 - set thermal expansion solid = 0.0 - end - end - end - - - -.. note:: - Using a ``phase_change`` model for the thermal conductivity, the thermal conductivity of the material varies linearly between ``thermal conductivity solid`` and ``thermal conductivity liquid`` when the temperature is in the range of the solidus and liquidus temperatures. - - -Mesh -~~~~ - -We start the simulation with a rectangular mesh that spans the domain defined by the corner points situated at :math:`[-0.0001, 0]` and -:math:`[0.0009, 0.0005]`. The first :math:`[4,2]` couple of the ``set grid arguments`` parameter defines the number of initial grid subdivisions along the length and height of the rectangle. -This allows for the initial mesh to be composed of perfect squares. We proceed then to redefine the mesh globally seven times by setting -``set initial refinement=7``. - -.. code-block:: text - - subsection mesh - set type = dealii - set grid type = subdivided_hyper_rectangle - set grid arguments = 4, 2 : -0.0001, 0 : 0.0009, 0.000500 : true - set initial refinement = 7 - end - - ----------------------- -Running the Simulation ----------------------- - -Call the lethe-fluid by invoking: - -.. code-block:: text - :class: copy-button - - mpirun -np 12 lethe-fluid laser-melt-pool.prm - -to run the simulation using twelve CPU cores. Feel free to use more. - - -.. warning:: - Make sure to compile lethe in `Release` mode and - run in parallel using mpirun. This simulation takes - :math:`\approx` 3 hours on 12 processes. - - -------- -Results -------- - -The following animation shows the temperature distribution in the simulations domain, as well the melted zone (using white contour lines at the liquidus and solidus temperatures). - -.. raw:: html - -

- - ------------ -References ------------ - -.. [#li2022] \E. Li, Z. Zhou, L. Wang, Q. Zheng, R. Zou, and A. Yu, “Melt pool dynamics and pores formation in multi-track studies in laser powder bed fusion process,” *Powder Technol.*, vol. 405, p. 117533, Jun. 2022, doi: `10.1016/j.powtec.2022.117533 `_\. - -.. [#liu2018] \S. Liu, H. Zhu, G. Peng, J. Yin, and X. Zeng, “Microstructure prediction of selective laser melting AlSi10Mg using finite element analysis,” *Mater. Des.*, vol. 142, pp. 319–328, Mar. 2018, doi: `10.1016/j.matdes.2018.01.022 - `_\. diff --git a/doc/source/examples/multiphysics/multiphysics.rst b/doc/source/examples/multiphysics/multiphysics.rst index aefdb96e5c..523192d59f 100644 --- a/doc/source/examples/multiphysics/multiphysics.rst +++ b/doc/source/examples/multiphysics/multiphysics.rst @@ -54,12 +54,10 @@ Multiphysics multiphysics_2_3 [label="Warming up a Viscous Fluid", href="https://chaos-polymtl.github.io/lethe/documentation/examples/multiphysics/warming-up-a-viscous-fluid/warming-up-a-viscous-fluid.html"]; multiphysics_2_4 [label="Melting Cavity", href="https://chaos-polymtl.github.io/lethe/documentation/examples/multiphysics/melting-cavity/melting-cavity.html"]; + + multiphysics_2_5 [label="Static Irradiation of a Bare Plate", href="https://chaos-polymtl.github.io/lethe/documentation/examples/multiphysics/static-irradiation/static-irradiation.html"]; - multiphysics_2_5 [label="Laser Heating", href="https://chaos-polymtl.github.io/lethe/documentation/examples/multiphysics/laser-heating/laser-heating.html"]; - - multiphysics_2_6 [label="Laser Melt Pool", href="https://chaos-polymtl.github.io/lethe/documentation/examples/multiphysics/laser-melt-pool/laser-melt-pool.html"]; - - multiphysics_2_7 [label="Concentric Heat Exchanger", href="https://chaos-polymtl.github.io/lethe/documentation/examples/multiphysics/concentric-heat-exchanger/concentric-heat-exchanger.html"]; + multiphysics_2_6 [label="Concentric Heat Exchanger", href="https://chaos-polymtl.github.io/lethe/documentation/examples/multiphysics/concentric-heat-exchanger/concentric-heat-exchanger.html"]; multiphysics_3 [label="Tracer", href="https://chaos-polymtl.github.io/lethe/documentation/examples/multiphysics/tracer.html"]; diff --git a/doc/source/examples/multiphysics/static-irradiation/images/new-benchmark.png b/doc/source/examples/multiphysics/static-irradiation/images/new-benchmark.png new file mode 100644 index 0000000000..12f4c63491 Binary files /dev/null and b/doc/source/examples/multiphysics/static-irradiation/images/new-benchmark.png differ diff --git a/doc/source/examples/multiphysics/static-irradiation/static-irradiation.rst b/doc/source/examples/multiphysics/static-irradiation/static-irradiation.rst new file mode 100644 index 0000000000..b06704cf0f --- /dev/null +++ b/doc/source/examples/multiphysics/static-irradiation/static-irradiation.rst @@ -0,0 +1,468 @@ +=================================== +Static Irradiation of a Bare Plate +=================================== + +This example simulates the static irradiation of a Ti6Al4V bare plate. It is based on the experimental work of Cunningham *et al.* [#cunningham2019]_ and includes the relevant phenomena involved in the laser powder bed fusion manufacturing process. + +**** + +-------- +Features +-------- + +- Solver: ``lethe-fluid`` +- Volume of fluid (VOF) and Heat Transfer (HT) +- Unsteady problem with phase change handled by an adaptive BDF1 time-stepping scheme + +**** + +--------------------------- +Files Used in this Example +--------------------------- + +All files mentioned below are located in the example's folder (``examples/multiphysics/static-irradiation``). + +- Parameter file: ``2D/static-irradiation.prm`` +- Mesh file: ``mesh/bare-plate-2D.msh`` + +**** + +----------------------- +Description of the Case +----------------------- + +Laser powder bed fusion is a manufacturing process using a laser to selectively melt and consolidate, layer-by-layer, a metal powder. Simply, it corresponds to 3D printing with a metal powder. The main laser-material interaction takes place at the melt pool scale where the flow dynamics involve multiple driving forces: + +- phase changes due to laser heating +- surface tension effects due to the small scale of the melt pool +- evaporative cooling and recoil pressure as temperature reaches the boiling point + +In this example, we consider the static irradiation of Ti6Al4V bare plate (without powder) in a building chamber backfilled with Argon to study the melt pool dynamics. We simulate an irradiation of :math:`0.5 \;\text{ms}` by a laser beam with a diameter of :math:`140\;\mu\text{m}` and a power of :math:`156\;\text{W}`. The following figure shows the case setup, which is based on the experimental work of Cunningham *et al.* [#cunningham2019]_ + ++-------------------------------------------------------------------------------------------------------------------+ +| .. figure:: images/new-benchmark.png | +| :align: center | +| :width: 620 | +| :name: Case setup | +| | ++-------------------------------------------------------------------------------------------------------------------+ + +The dimensions (:math:`H, \Delta h`, and :math:`L`) and the Dirichlet boundary condition values (:math:`u_{\text{in}}, T_\text{in}`, and :math:`T_\text{0}`) are listed bellow. + ++---------------------------+---------------------------+----------------------------+-----------------------------+ +| Parameter | Value | Parameter | Value | ++---------------------------+---------------------------+----------------------------+-----------------------------+ +| :math:`H` | :math:`170\;\mu\text{m}` | :math:`u_{\text{in}}` | :math:`0.1\;\text{m s}^{-1}`| ++---------------------------+---------------------------+----------------------------+-----------------------------+ +| :math:`\Delta h` | :math:`20\;\mu\text{m}` | :math:`T_{\text{in}}` | :math:`298\;\text{K}` | ++---------------------------+---------------------------+----------------------------+-----------------------------+ +| :math:`L` | :math:`600\;\mu\text{m}` | :math:`T_{\text{0}}` | :math:`298\;\text{K}` | ++---------------------------+---------------------------+----------------------------+-----------------------------+ + +There are three phases involved in this simulation: solid and liquid Ti6Al4V, and Argon. The metal-gas interface is handled by the VOF solver, while the solid-liquid interface is obtained from the temperature field of the HT solver. Hence, this example models a two-fluid problem: ``fluid 0`` corresponds to the Argon phase and ``fluid 1`` is the metal (solid and liquid), for which the solid part corresponds to a infinitely viscous fluid. + +.. note:: + To improve the performance of the solvers, all dimensional quantities in this example are based on the SI system except for the reference length, which is taken as :math:`1\;\text{mm}`. This scaling helps the matrices to have better conditioning, as explained for the pressure scaling in the :doc:`stabilization subsection <../../../parameters/cfd/stabilization>`. + +-------------- +Parameter File +-------------- + +Simulation Control +~~~~~~~~~~~~~~~~~~ + +The time integration is handled by a first order backward differentiation scheme (``bdf1``) with a maximum time-step of :math:`\Delta t = 1.9 \times 10^{-8} \; \text{s} < \Delta t_\sigma` which corresponds to the capillary time-step constraint (see :doc:`capillary wave example <../capillary-wave/capillary-wave>`). We use adaptive time stepping with a maximum CFL of :math:`0.06` to prevent instability resulting from the explicit coupling between the NS and HT solvers through the recoil pressure and evaporative cooling. + +.. code-block:: text + + subsection simulation control + set method = bdf1 + set time end = 0.0005 + set time step = 1.9e-8 + set adapt = true + set max cfl = 0.06 + set max time step = 1.9e-8 + set output name = static-irradiation + set output path = output/ + set output frequency = 100 + end + +Multiphysics +~~~~~~~~~~~~ + +In the ``multiphysics`` subsection, we enable both the VOF and HT solvers. + +.. code-block:: text + + subsection multiphysics + set VOF = true + set heat transfer = true + end + +Mesh and box refinement +~~~~~~~~~~~~~~~~~~~~~~~ + +The coarse level mesh considered for this example is generated with Pointwise to enable the imposition of the inlet and outlet boundary conditions described in the figure above. It is then uniformly refined :math:`4` times and box refinement is used to insure a well discretized metal-gas interface. + +.. code-block:: text + + subsection mesh + set type = gmsh + set file name = ../mesh/bare-plate-2D.msh + set initial refinement = 4 + end + + subsection box refinement + subsection mesh + set type = dealii + set grid type = subdivided_hyper_rectangle + set grid arguments = 8,1 : 0,0.3925: 0.6,0.4675: false + end + set initial refinement = 3 + end + +Mesh Adaptation +~~~~~~~~~~~~~~~ + +As the laser heats the metal-gas interface, a vapor depression forms and deepens, and the liquid-gas interface reaches the bottom boundary of the box refinement. Hence, we dynamically adapt the mesh using the ``temperature`` as the refinement ``variable`` to keep a well discretized interface. We choose :math:`7` as the ``min refinement level`` and :math:`4` as the ``max refinement level``. The mesh is adapted each :math:`20` iterations to reduce the computational cost by setting ``frequency = 20``. Note that the ``fraction coarsening`` is set to :math:`0.0` to avoid coarsening in the center of the melt pool, where the temperature gradient, used by the Kelly error estimator, is less important than at the liquid-gas interface. + +.. code-block:: text + + subsection mesh adaptation + set type = kelly + set variable = temperature + set fraction type = fraction + set max refinement level = 7 + set min refinement level = 4 + set frequency = 20 + set fraction refinement = 0.4 + set fraction coarsening = 0.0 + end + +Boundary Conditions +~~~~~~~~~~~~~~~~~~~ + +In the ``boundary conditions`` subsection, we set the boundary conditions described in the figure above for the NS, HT, and VOF solvers. The following ``subsection boundary conditions`` sets the NS boundary conditions: + +.. code-block:: text + + subsection boundary conditions + set number = 6 + subsection bc 0 + set id = 2 # bottom wall + set type = noslip + end + subsection bc 1 + set id = 5 # bottom part of the right wall + set type = noslip + end + subsection bc 2 + set id = 6 + set type = outlet # top part of the right wall + set beta = 0 + end + subsection bc 3 + set id = 7 + set type = slip # top wall + end + subsection bc 4 + set id = 4 # top part of the left wall + set type = function + subsection u + set Function expression = 100.0 + end + subsection v + set Function expression = 0 + end + end + subsection bc 5 + set id = 3 # bottom part of the left wall + set type = noslip + end + end + +In ``subsection boundary conditions heat transfer``, we set the boundary conditions for the HT solver: + +.. code-block:: text + + subsection boundary conditions heat transfer + set number = 6 + subsection bc 0 + set id = 2 # bottom wall + set type = temperature + subsection value + set Function expression = 298 + end + end + subsection bc 1 + set id = 5 # bottom part of the right wall + set type = noflux + end + subsection bc 2 + set id = 6 # top part of the right wall + set type = noflux + end + subsection bc 3 + set id = 7 # top wall + set type = noflux + end + subsection bc 4 + set id = 4 # top part of the left wall + set type = temperature + subsection value + set Function expression = 298 + end + end + subsection bc 5 + set id = 3 # bottom part of the left wall + set type = noflux + end + end + +.. note:: + + We recover the ``id`` of each boundary at the end of the mesh file generated with Pointwise (``mesh/bare-plate-2D.msh``): + + .. code-block:: text + + $PhysicalNames + 6 + 1 2 "bottom" + 1 3 "left_bottom" + 1 4 "left_top" + 1 5 "right_bottom" + 1 6 "right_top" + 1 7 "top" + $EndPhysicalNames + + Here, the ``id`` corresponds to the second column and we identify the corresponding boundary in the domain with the description given in the third column. + +For the sake of brevity, we leave out the ``subsection boundary conditions VOF`` because they all corresponds to no flux boundary conditions (``none``). However, in the example's parameter file, all boundary conditions are defined. + +Initial Conditions +~~~~~~~~~~~~~~~~~~ + +In the ``initial conditions`` subsection, we set the initial condition for all the solvers: + +- NS intial conditions are :math:`0.0` for both velocity components and for the pressure +- HT intial condition corresponds to a uniform temperature :math:`T_\text{0} = 298\;\text{K}` +- VOF intial condition allows us to described the metal and gas phases. The bottom part of the domain (:math:`y<430\;\mu\text{m}`) corresponds to the Ti6Al4V metal phase (``fluid 1``), while Argon (``fluid 0``) fills the top part. + +.. code-block:: text + + subsection initial conditions + set type = nodal + subsection uvwp + set Function expression = 0; 0; 0 + end + subsection temperature + set Function expression = 298 + end + subsection VOF + set Function expression = if (y<0.43 , 1, 0) + end + end + +Physical Properties +~~~~~~~~~~~~~~~~~~~~ + +The ``physical properties`` subsection sets the material properties for the metal and gas phase. It is in this subsection that we activate the phase change by setting the solid and liquid properties for the metal phase, in the same fashion as in the :doc:`Stefan problem <../stefan-problem/stefan-problem>` and :doc:`melting cavity <../melting-cavity/melting-cavity>` examples. However, since we consider an alloy (TI6Al4V), the phase change occurs over a temperature range. Hence, the difference between the ``liquidus temperature`` and ``solidus temperature`` corresponds to the real temperature range in which the solid and liquid TI6Al4V coexist (mushy zone). + +We also set in this subsection the reference surface tension coefficient of the metal-gas interface and its temperature derivative to simulate the Maragoni effect. Here, we consider a linear evolution of the surface tension coefficient with the temperature at the liquid-gas interface, and we neglect its effect at the solid-gas interface to avoid numerical instabilities. This is done by setting ``surface tension model = phase change``. We refer to the parameter guide :doc:`../../../../parameters/cfd/physical_properties` for more details on this model. + +.. code-block:: text + + subsection physical properties + set number of fluids = 2 + subsection fluid 1 + set density = 4.42e-6 + set thermal conductivity = 2.88e4 + + set thermal expansion model = phase_change + set rheological model = phase_change + set specific heat model = phase_change + + subsection phase change + set liquidus temperature = 1928.0 + set solidus temperature = 1878.0 + + set viscosity liquid = 0.905 + set viscosity solid = 9.05e4 + + set specific heat liquid = 1.126e9 + set specific heat solid = 0.8e9 + set latent enthalpy = 2.9e11 + end + end + + subsection fluid 0 + set density = 1.784e-9 + set thermal conductivity = 18 + set kinematic viscosity = 56.1 + set specific heat = 5.20e8 + end + + set number of material interactions = 1 + subsection material interaction 0 + set type = fluid-fluid + subsection fluid-fluid interaction + set first fluid id = 0 + set second fluid id = 1 + set surface tension model = phase change + set surface tension coefficient = 1.52 + set reference state temperature = 1928.0 + set temperature-driven surface tension gradient = -5.5e-4 + set liquidus temperature = 1928.0 + set solidus temperature = 1878.0 + end + end + end + +Laser parameters +~~~~~~~~~~~~~~~~ + +We defined the laser heat source in the ``laser parameters`` subsection. In the present example, we are considering the irradiation of a bare plate. Thus, the laser only heats the metal-gas interface and we model this surface heat flux using the ``gaussian_heat_flux_vof_interface`` laser model. We refer to the parameter guide :doc:`../../../../parameters/cfd/laser_heat_source` for more details on this model. + +.. code-block:: text + + subsection laser parameters + set enable = true + set type = gaussian_heat_flux_vof_interface + set power = 156e6 + set absorptivity = 0.35 + set beam radius = 0.07 + set start time = 0 + set end time = 0.002 + set beam orientation = y- + subsection path + set Function expression = 0.3; 0.43 + end + end + +The laser is static in the middle of the domain at the metal-gas interface :math:`\vec{x} = [0.3, 0.43]`, hence its ``path`` is independent of the time. Note that the :math:`y` component of the ``path`` is not relevant: the ``gaussian_heat_flux_vof_interface`` model applies the laser heat flux at the metal-gas interface no matter its postion along the :math:`y` axis. This allows us to model the effect of the interface deformation on the surface heat flux. + +Evaporation +~~~~~~~~~~~ + +The cooling and the recoil pressure due to a fast, out of equilibrium, evaporation are driving forces in the energy and momentum balances, respectively. We active both terms in the ``evaporation`` subsection. + +.. code-block:: text + + subsection evaporation + set evaporation mass flux model = temperature_dependent + set enable evaporative cooling = true + set enable recoil pressure = true + + set evaporation coefficient = 0.82 + set recoil pressure coefficient = 0.56 + set evaporation latent heat = 8.9e12 + set molar mass = 4.58e-2 + set universal gas constant = 8.314e6 + set boiling temperature = 3550.0 + set ambient pressure = 101.325 + end + +In this example, we consider the model of Anisimov and Khokhlov [#anisimov1995]_ to compute the evaporative cooling :math:`q_\text{evap}` and the recoil pressure :math:`p_\text{rec}`: + +.. math:: + + q_\text{evap} = \phi_\text{evap} L_\text{vap} p_\text{sat}\sqrt{\frac{M}{2\pi R}} + +.. math:: + + p_\text{rec} = \psi_\text{evap} p_\text{sat} + +where :math:`\phi_\text{evap}=0.82` and :math:`\psi_\text{evap}=0.56` are the ``evaporation coefficient`` and ``recoil pressure coefficient``, respectively, :math:`L_\text{vap}=8.9\times 10^{6}\;\text{Jkg}^{-1}` is the ``evaporation latent heat``, :math:`M=4.58\times 10^{-2}` is the ``molar mass`` of the metal, :math:`R=8.314\;\text{Jmol K}^{-1}` is the ``universal gas constant`` and :math:`p_\text{sat}` is the saturation pressure. The latter is computed according to: + +.. math:: + + p_\text{sat} = p_\text{atm}\exp{\left[\frac{L_\text{vap}M}{RT_\text{boil}}\left(1-\frac{T_\text{boil}}{T}\right)\right]} + +where :math:`p_\text{atm}=101.325\;\text{kPa}` is the ``ambient pressure``, and :math:`T_\text{boil}=3550\;\text{K}` is the ``boiling temperature``. + +Both terms are then applied at the liquid-gas interface using the Continuous Surface Force (CSF) model, as described for the surface tension in :doc:`../../../theory/multiphase/cfd/vof` theory guide. + + +Non-Linear Solver +~~~~~~~~~~~~~~~~~ + +The parameters for the non-linear system resolution of the three physiscs are set in the ``non-linear solver`` subsection. + +.. code-block:: text + + subsection non-linear solver + subsection fluid dynamics + set tolerance = 1e-4 + set max iterations = 20 + set verbosity = verbose + end + subsection heat transfer + set tolerance = 100 + set max iterations = 20 + set verbosity = verbose + end + subsection VOF + set tolerance = 1e-4 + set max iterations = 20 + set verbosity = verbose + end + end + +We select the tolerances of the NS and HT non-linear solvers so that the norm of the velocity, pressure and temperature corrections make sense with the order of magnitude of the corresponding solution. For example, we set the tolerance on the residual of the HT solver to ``100``, resulting in a maximal correction of :math:`\text{O}(1\times 10^{-3})` on the temperature, which is :math:`\text{O}(1\times 10^{3})`: + +.. code-block:: text + + -------------- + Heat Transfer + -------------- + Newton iteration: 0 - Residual: 1.985e+07 + -Tolerance of iterative solver is : 1.985e+05 + -Iterative solver took : 2 steps to reach a residual norm of 3.944e+04 + alpha = 1 res = 1.583e+05 ||dT||_L2 = 71.89 ||dT||_Linfty = 15.46 + Newton iteration: 1 - Residual: 1.583e+05 + -Tolerance of iterative solver is : 1583 + -Iterative solver took : 2 steps to reach a residual norm of 409.8 + alpha = 1 res = 1074 ||dT||_L2 = 0.3355 ||dT||_Linfty = 0.103 + Newton iteration: 2 - Residual: 1074 + -Tolerance of iterative solver is : 10.74 + -Iterative solver took : 2 steps to reach a residual norm of 5.567 + alpha = 1 res = 5.47 ||dT||_L2 = 0.0111 ||dT||_Linfty = 0.001807 + +The linear solver tolerances are set accordingly. + +**** + +----------------------- +Running the Simulation +----------------------- + +We call ``lethe-fluid`` to launch the simulation by invoking the following command from the ``2D`` subdirectory: + +.. code-block:: text + :class: copy-button + + mpirun -np 14 lethe-fluid static-irradiation.prm + +.. warning:: + Make sure to compile Lethe in `Release` mode and run in parallel using mpirun. + This simulation takes :math:`\sim \, 24` hours on :math:`12` processes. + +------- +Results +------- + +The following video shows on the left the temperature evolution in the metal, and on the right, the phase fraction evolution. We observe the melt pool, delimited by the black line, deepening and the formation of the vapor depression at the liquid-gas interface. This is often refered as a keyhole. It is caused by the recoil pressure, resulting from the fast out of equilibrium evaporation, and the Marangoni effect, driving melt alway from the melt pool center. + +.. raw:: html + + + +We also observe a air cushion forming at the triple-phase contact line. We assume it is linked to the fact that wetting is not modeled in the simulation. Thus, the implementation of a wetting model corresponds to a future addition in Lethe. + +---------- +References +---------- + +.. [#cunningham2019] \R. Cunningham et al., "Keyhole threshold and morphology in laser melting revealed by ultrahigh-speed x-ray imaging," *Science*, vol. 363, pp. 849-852, Feb. 2019, doi: `10.1126/science.aav4687 `_\. + +.. [#anisimov1995] \S. I. Anisimov and V. A. Khokhlov. Instabilities in laser-matter interaction. CRC press, 1995. \ No newline at end of file diff --git a/doc/source/parameters/cfd/boundary_conditions_cfd.rst b/doc/source/parameters/cfd/boundary_conditions_cfd.rst index c68e630884..33802a2088 100644 --- a/doc/source/parameters/cfd/boundary_conditions_cfd.rst +++ b/doc/source/parameters/cfd/boundary_conditions_cfd.rst @@ -55,7 +55,7 @@ where :math:`\beta` is a constant and :math:`(\mathbf{u}\cdot \mathbf{n})_{-}` set periodic_id = 1 set periodic_direction = 0 - set beta = 0 + set beta = 1 end subsection bc 1 set type = noslip diff --git a/examples/multiphysics/laser-heating/laser-heating.prm b/examples/multiphysics/laser-heating/laser-heating.prm deleted file mode 100644 index edfce8a32e..0000000000 --- a/examples/multiphysics/laser-heating/laser-heating.prm +++ /dev/null @@ -1,184 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2022-2024 The Lethe Authors -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later - -# Listing of Parameters -#---------------------- - -set dimension = 3 - -#--------------------------------------------------- -# Simulation Control -#--------------------------------------------------- - -subsection simulation control - set method = bdf2 - set time end = 0.003 - set time step = 0.00005 - set output name = laser-heating - set output frequency = 1 - set output path = ./output/ - set subdivision = 1 -end - -#--------------------------------------------------- -# Multiphysics -#--------------------------------------------------- - -subsection multiphysics - set heat transfer = true -end - -#--------------------------------------------------- -# Laser -#--------------------------------------------------- - -subsection laser parameters - set enable = true - set type = exponential_decay - set concentration factor = 50 - set power = 3 - set absorptivity = 0.6 - set penetration depth = 0.00005 - set beam radius = 0.00005 - set start time = 0 - set end time = 0.003 - set beam orientation = z- - subsection path - set Function expression = if(t<0.001, 0.5 * t, if(t<0.002, 0.0005, if(t<0.003 , 0.0005-0.5 * (t-0.002), -1))); if(t<0.001, 0.00025, if(t < 0.002, 0.00025 - 0.5 * (t-0.001) , if(t < 0.003 , -0.00025, -1))) ; 0.0003 - end -end - -#--------------------------------------------------- -# Initial condition -#--------------------------------------------------- - -subsection initial conditions - set type = nodal - subsection uvwp - set Function expression = 0; 0; 0; 0 - end -end - -#--------------------------------------------------- -# Physical Properties -#--------------------------------------------------- - -subsection physical properties - set number of fluids = 1 - subsection fluid 0 - set thermal conductivity = 3 - set density = 1000 - set kinematic viscosity = 100 - set specific heat = 420 - end -end - -#--------------------------------------------------- -# Mesh -#--------------------------------------------------- - -subsection mesh - set type = dealii - set grid type = subdivided_hyper_rectangle - set grid arguments = 30, 25, 5 : -0.0002, -0.0005, 0 : 0.001, 0.0005, 0.0002 : false - set initial refinement = 1 -end - -#--------------------------------------------------- -# Mesh Adaptation -#--------------------------------------------------- - -subsection mesh adaptation - set type = kelly - set variable = temperature - set fraction type = fraction - set max refinement level = 4 - set min refinement level = 0 - set frequency = 1 - set fraction refinement = 0.5 - set fraction coarsening = 0.2 -end - -#--------------------------------------------------- -# Boundary Conditions -#--------------------------------------------------- - -subsection boundary conditions - set number = 1 - subsection bc 0 - set type = noslip - end -end - -subsection boundary conditions heat transfer - set number = 1 - subsection bc 0 - set type = convection-radiation-flux - subsection h - set Function expression = 5 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.4 - end - end -end - -#--------------------------------------------------- -# FEM -#--------------------------------------------------- - -subsection FEM - set velocity order = 1 - set pressure order = 1 -end - -#--------------------------------------------------- -# Non-Linear Solver Control -#--------------------------------------------------- - -subsection non-linear solver - subsection heat transfer - set tolerance = 1e-8 - set max iterations = 100 - set verbosity = quiet - end - subsection fluid dynamics - set tolerance = 1e-8 - set max iterations = 100 - set verbosity = quiet - end -end - -#--------------------------------------------------- -# Linear Solver Control -#--------------------------------------------------- - -subsection linear solver - subsection fluid dynamics - set verbosity = quiet - set method = gmres - set max iters = 8000 - set relative residual = 1e-3 - set minimum residual = 1e-8 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 - set max krylov vectors = 200 - end - subsection heat transfer - set verbosity = quiet - set method = gmres - set max iters = 8000 - set relative residual = 1e-3 - set minimum residual = 1e-8 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 - set max krylov vectors = 200 - end -end diff --git a/examples/multiphysics/laser-heating/output/dummy b/examples/multiphysics/laser-heating/output/dummy deleted file mode 100644 index 185b2ed1b5..0000000000 --- a/examples/multiphysics/laser-heating/output/dummy +++ /dev/null @@ -1 +0,0 @@ -Ensures that the output folder exists diff --git a/examples/multiphysics/laser-melt-pool/laser-melt-pool.prm b/examples/multiphysics/laser-melt-pool/laser-melt-pool.prm deleted file mode 100644 index 0150309419..0000000000 --- a/examples/multiphysics/laser-melt-pool/laser-melt-pool.prm +++ /dev/null @@ -1,268 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2022-2024 The Lethe Authors -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later - -# Listing of Parameters -#---------------------- - -set dimension = 2 - -#--------------------------------------------------- -# Simulation Control -#--------------------------------------------------- - -subsection simulation control - set method = bdf2 - set time end = 0.005 - set time step = 0.000005 - set output name = laser-melt-pool - set output frequency = 1 - set output path = ./output/ -end - -#--------------------------------------------------- -# Multiphysics -#--------------------------------------------------- - -subsection multiphysics - set heat transfer = true - set buoyancy force = true - set fluid dynamics = true -end - -#--------------------------------------------------- -# Laser parameters -#--------------------------------------------------- - -subsection laser parameters - set enable = true - set type = exponential_decay - set concentration factor = 2 - set power = 100 - set absorptivity = 0.6 - set penetration depth = 0.000070 - set beam radius = 0.000050 - set start time = 0 - set end time = 0.001 - set beam orientation = y- - subsection path - set Function expression = 0.5 * t; 0.000500 - end -end - -#--------------------------------------------------- -# Source Term -#--------------------------------------------------- - -subsection source term - subsection fluid dynamics - set Function expression = 0 ; -9.81 ; 0 - end -end - -#--------------------------------------------------- -# Initial condition -#--------------------------------------------------- - -subsection initial conditions - set type = nodal - subsection uvwp - set Function expression = 0; 0; 0 - end - - subsection temperature - set Function expression = 20 - end -end - -#--------------------------------------------------- -# Physical Properties -#--------------------------------------------------- - -subsection physical properties - set number of fluids = 1 - subsection fluid 0 - set thermal conductivity model = phase_change - set thermal expansion model = phase_change - set rheological model = phase_change - set specific heat model = phase_change - - set density = 4420 - - subsection phase change - # Enthalpy of the phase change - set latent enthalpy = 286000 - - # Temperature of the liquidus - set liquidus temperature = 1650 - - # Temperature of the solidus - set solidus temperature = 1604 - - # Specific heat of the liquid phase - set specific heat liquid = 831 - - # Specific heat of the solid phase - set specific heat solid = 670 - - # Kinematic viscosity of the liquid phase - set viscosity liquid = 0.00000069 - - # Kinematic viscosity of the solid phase - set viscosity solid = 0.008 - - set thermal conductivity solid = 33.4 - set thermal conductivity liquid = 10.6 - - set thermal expansion liquid = 0.0002 - set thermal expansion solid = 0.0 - end - end -end - -#--------------------------------------------------- -# Mesh -#--------------------------------------------------- - -subsection mesh - set type = dealii - set grid type = subdivided_hyper_rectangle - set grid arguments = 4, 2 : -0.0001, 0 : 0.0009, 0.000500 : true - set initial refinement = 7 -end - -#--------------------------------------------------- -# Boundary Conditions -#--------------------------------------------------- - -subsection boundary conditions - set number = 4 - subsection bc 0 - set id = 0 - set type = noslip - end - subsection bc 1 - set id = 1 - set type = noslip - end - subsection bc 2 - set id = 2 - set type = noslip - end - subsection bc 3 - set id = 3 - set type = noslip - end -end - -subsection boundary conditions heat transfer - set number = 4 - subsection bc 0 - set id = 0 - set type = convection-radiation-flux - subsection h - set Function expression = 80 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.6 - end - end - subsection bc 1 - set id = 1 - set type = convection-radiation-flux - subsection h - set Function expression = 80 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.6 - end - end - subsection bc 2 - set id = 2 - set type = convection-radiation-flux - subsection h - set Function expression = 80 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.6 - end - end - subsection bc 3 - set id = 3 - set type = convection-radiation-flux - subsection h - set Function expression = 80 - end - subsection Tinf - set Function expression = 20 - end - subsection emissivity - set Function expression = 0.6 - end - end -end - -#--------------------------------------------------- -# FEM -#--------------------------------------------------- - -subsection FEM - set velocity order = 1 - set pressure order = 1 -end - -#--------------------------------------------------- -# Non-Linear Solver Control -#--------------------------------------------------- - -subsection non-linear solver - subsection heat transfer - set tolerance = 1e-8 - set max iterations = 100 - set verbosity = verbose - end - subsection fluid dynamics - set tolerance = 1e-8 - set max iterations = 100 - set verbosity = verbose - end -end - -#--------------------------------------------------- -# Linear Solver Control -#--------------------------------------------------- - -subsection linear solver - subsection fluid dynamics - set verbosity = verbose - set method = gmres - set max iters = 10000 - set relative residual = 1e-3 - set minimum residual = 1e-8 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-14 - set ilu preconditioner relative tolerance = 1.00 - set max krylov vectors = 200 - end - subsection heat transfer - set verbosity = verbose - set method = gmres - set max iters = 10000 - set relative residual = 1e-3 - set minimum residual = 1e-8 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-14 - set ilu preconditioner relative tolerance = 1.00 - set max krylov vectors = 200 - end -end diff --git a/examples/multiphysics/laser-melt-pool/output/dummy b/examples/multiphysics/laser-melt-pool/output/dummy deleted file mode 100644 index 185b2ed1b5..0000000000 --- a/examples/multiphysics/laser-melt-pool/output/dummy +++ /dev/null @@ -1 +0,0 @@ -Ensures that the output folder exists diff --git a/examples/multiphysics/laser-powder-bed-fusion/1D/benchmark.prm b/examples/multiphysics/laser-powder-bed-fusion/1D/benchmark.prm deleted file mode 100644 index 57ea0e827a..0000000000 --- a/examples/multiphysics/laser-powder-bed-fusion/1D/benchmark.prm +++ /dev/null @@ -1,331 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2024 The Lethe Authors -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later - -# Listing of Parameters -#---------------------- - -set dimension = 2 - -#--------------------------------------------------- -# Simulation Control -#--------------------------------------------------- - -subsection simulation control - set method = bdf2 - set output frequency = 1 - set output path = ./output/ - set time end = 0.002 - set time step = 0.00001 -end - -#--------------------------------------------------- -# Multiphysics -#--------------------------------------------------- - -subsection multiphysics - set VOF = true - set heat transfer = true -end - -#--------------------------------------------------- -# Mesh -#--------------------------------------------------- - -subsection mesh - set type = dealii - set grid type = subdivided_hyper_rectangle - set grid arguments = 1,2048: 0,0:0.14,0.6: true - set initial refinement = 0 -end - -#--------------------------------------------------- -# Mesh Adaptation -#--------------------------------------------------- - -subsection mesh adaptation - set type = none - set variable = phase - set fraction type = fraction - set max number elements = 5000000 - set mesh refinement controller = false - set max refinement level = 9 - set min refinement level = 4 - set frequency = 1 - set fraction refinement = 0.99 - set fraction coarsening = 0.0 - set initial refinement steps = 1 -end - -#--------------------------------------------------- -# Boundary Conditions -#--------------------------------------------------- - -subsection boundary conditions - set number = 4 - subsection bc 0 - set id = 2 - set type = noslip - end - subsection bc 1 - set id = 0 - set type = none - end - subsection bc 2 - set id = 1 - set type = none - end - subsection bc 3 - set id = 3 - set type = slip - end -end - -subsection boundary conditions heat transfer - set number = 4 - subsection bc 0 - set id = 2 - set type = temperature - subsection value - set Function expression = 298 - end - end - subsection bc 1 - set id = 0 - set type = noflux - end - subsection bc 2 - set id = 1 - set type = noflux - end - subsection bc 3 - set id = 3 - set type = noflux - end -end - -subsection boundary conditions VOF - set number = 4 -end - -#--------------------------------------------------- -# Initial condition -#--------------------------------------------------- - -subsection initial conditions - set type = nodal - subsection uvwp - set Function expression = 0; 0; 0 - end - subsection VOF - set Function expression = if (y<0.43 , 1, 0) - subsection projection step - set enable = false - set diffusion factor = 1 - end - end - subsection temperature - set Function expression = 298 - end -end - -#--------------------------------------------------- -# Physical Properties -#--------------------------------------------------- - -subsection physical properties - set number of fluids = 2 - subsection fluid 1 - set density = 4420e-9 # M*L^-3 - - set thermal conductivity model = phase_change - set thermal expansion model = phase_change - set rheological model = phase_change - set specific heat model = phase_change - - subsection phase change - # Enthalpy of the phase change - set latent enthalpy = 290000e6 # L^2*T^-2 - - # Temperature of the liquidus - set liquidus temperature = 1928.0 # Theta - - # Temperature of the solidus - set solidus temperature = 1878.0 # Theta - - # viscosity of the liquid phase - set viscosity liquid = 0.905 # L^2*T^-1 - - # viscosity of the solid phase - set viscosity solid = 905 # L^2*T^-1 - - # thermal conductivity of the liquid phase - set thermal conductivity liquid = 28.8e3 # M*L*T^-3*Theta^-1 - - # thermal conductivity of the solid phase - set thermal conductivity solid = 28.8e3 # M*L*T^-3*Theta^-1 - - # Specific heat of the liquid phase - set specific heat liquid = 1126e6 # L^2*Theta^-1*T^-2 - - # Specific heat of the solid phase - set specific heat solid = 800e6 # L^2*Theta^-1*T^-2 - end - end - - subsection fluid 0 - set density = 1.784e-9 # M*L^-3 - set kinematic viscosity = 56.1 # L^2*T^-1 - set thermal conductivity = 0.018e3 # M*L*T^-3*Theta^-1 - set specific heat = 520e6 # L^2*Theta^-1*T^-2 - end - - set number of material interactions = 1 - subsection material interaction 0 - set type = fluid-fluid - subsection fluid-fluid interaction - set first fluid id = 0 - set second fluid id = 1 - set surface tension model = phase change - set surface tension coefficient = 0 # M*T^-2 - set reference state temperature = 0.0 - set temperature-driven surface tension gradient = 0 # M*T^-2*Theta^-1 - set liquidus temperature = 1928 # Theta - set solidus temperature = 1878 # Theta - end - end -end - -#--------------------------------------------------- -# Laser parameters -#--------------------------------------------------- - -subsection laser parameters - set enable = true - set type = uniform_heat_flux_vof_interface - set concentration factor = 2 - set power = 156e6 # M*L^2*T^-3 - set absorptivity = 0.35 - set penetration depth = 0.0 - set beam radius = 0.07 # L - set start time = 0 - set end time = 0.002 - set beam orientation = y- - subsection path - set Function expression = 0.07; 0.43 - end -end - -#--------------------------------------------------- -# VOF -#--------------------------------------------------- - -subsection VOF - subsection interface sharpening - set enable = false - set threshold = 0.5 - set interface sharpness = 1.4 - set frequency = 10 - set type = constant - end - subsection phase filtration - set type = tanh - set verbosity = quiet - set beta = 20 - end - subsection surface tension force - set enable = true - set phase fraction gradient diffusion factor = 4 - set curvature diffusion factor = 1 - set output auxiliary fields = true - set enable marangoni effect = true - end -end - -#--------------------------------------------------- -# Evaporation -#--------------------------------------------------- - -subsection evaporation - set evaporation mass flux model = temperature_dependent - set enable evaporative cooling = true - set enable recoil pressure = true - set evaporation latent heat = 8.9e12 # L^2*T^-2 - set molar mass = 4.58e-2 - set boiling temperature = 3550 - - set evaporation coefficient = 0.82 - set recoil pressure coefficient = 0.56 - set ambient pressure = 101325e-3 - set liquid density = 4420.0e-9 - set universal gas constant = 8.314e6 -end - -#--------------------------------------------------- -# Non-Linear Solver Control -#--------------------------------------------------- - -subsection non-linear solver - subsection fluid dynamics - set tolerance = 1e-4 - set max iterations = 20 - set verbosity = verbose - end - subsection heat transfer - set tolerance = 1e-2 - set max iterations = 20 - set verbosity = verbose - end - subsection VOF - set tolerance = 1e-4 - set max iterations = 20 - set verbosity = verbose - end -end - -#--------------------------------------------------- -# Linear Solver Control -#--------------------------------------------------- - -subsection linear solver - subsection fluid dynamics - set verbosity = verbose - set method = gmres - set relative residual = 1e-3 - set minimum residual = 1e-5 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 - end - subsection heat transfer - set verbosity = verbose - set method = gmres - set relative residual = 1e-1 - set minimum residual = 1e-3 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 - end - subsection VOF - set verbosity = verbose - set method = gmres - set relative residual = 1e-3 - set minimum residual = 1e-5 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 - end -end - -subsection restart - set checkpoint = true - set frequency = 500 - set filename = restart - set restart = false -end - -subsection timer - set type = iteration -end diff --git a/examples/multiphysics/laser-powder-bed-fusion/3D/benchmark.prm b/examples/multiphysics/laser-powder-bed-fusion/3D/benchmark.prm deleted file mode 100644 index 3de70a1fec..0000000000 --- a/examples/multiphysics/laser-powder-bed-fusion/3D/benchmark.prm +++ /dev/null @@ -1,452 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2024 The Lethe Authors -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later - -# Listing of Parameters -#---------------------- - -set dimension = 3 - -#--------------------------------------------------- -# Simulation Control -#--------------------------------------------------- - -subsection simulation control - set method = bdf2 - set output frequency = 100 - set output path = ./output/ - set time end = 0.002 - set time step = 1.9e-8 - set max cfl = 0.75 - set max time step = 1.9e-8 - set adapt = true -end - -#--------------------------------------------------- -# Multiphysics -#--------------------------------------------------- - -subsection multiphysics - set VOF = true - set heat transfer = true -end - -#--------------------------------------------------- -# Mesh -#--------------------------------------------------- - -subsection mesh - set type = gmsh - set file name = ../mesh/3d-benchmark.msh - set initial refinement = 4 -end - -#--------------------------------------------------- -# Box Refinement -#--------------------------------------------------- - -subsection box refinement - subsection mesh - set type = dealii - set grid type = subdivided_hyper_rectangle - set grid arguments = 8,1,8 : 0,0.41,-0.3 : 0.6,0.44,0.3 : false - set initial refinement = 0 - end - set initial refinement = 3 -end - -#--------------------------------------------------- -# Mesh Adaptation -#--------------------------------------------------- - -subsection mesh adaptation - set type = kelly - set variable = temperature, phase - set min refinement level = 4 - set max refinement level = 7 - set fraction coarsening = 0.0, 0.0 - set fraction refinement = 0.4, 0.99 - set fraction type = fraction - set frequency = 20 -end - -#--------------------------------------------------- -# Boundary Conditions -#--------------------------------------------------- - -subsection boundary conditions - set number = 10 - # Solid metal region - subsection bc 0 - set id = 2 - set type = noslip - end - subsection bc 1 - set id = 3 - set type = noslip - end - subsection bc 2 - set id = 4 - set type = noslip - end - subsection bc 3 - set id = 5 - set type = noslip - end - subsection bc 4 - set id = 6 - set type = noslip - end - subsection bc 4 - set id = 6 - set type = noslip - end - # Gas region - subsection bc 5 - set id = 7 - set type = slip - end - subsection bc 6 - set id = 8 - set type = slip - end - subsection bc 7 - set id = 9 - set type = slip - end - subsection bc 8 - set id = 10 - set type = function - subsection u - set Function expression = 0.1 - end - subsection v - set Function expression = 0 - end - end - subsection bc 9 - set id = 11 - set type = outlet - end -end - -subsection boundary conditions heat transfer - set number = 10 - # Solid metal region - subsection bc 0 - set id = 2 - set type = temperature - subsection value - set Function expression = 298 - end - end - subsection bc 1 - set id = 3 - set type = noflux - end - subsection bc 2 - set id = 4 - set type = noflux - end - subsection bc 3 - set id = 5 - set type = noflux - end - subsection bc 4 - set id = 6 - set type = noflux - end - # Gaz region - subsection bc 5 - set id = 7 - set type = noflux - end - subsection bc 6 - set id = 8 - set type = noflux - end - subsection bc 7 - set id = 9 - set type = noflux - end - subsection bc 8 - set id = 10 - set type = temperature - subsection value - set Function expression = 298 - end - end - subsection bc 9 - set id = 11 - set type = noflux - end -end - -subsection boundary conditions VOF - set number = 10 - subsection bc 0 - set id = 2 - set type = none - end - subsection bc 1 - set id = 3 - set type = none - end - subsection bc 2 - set id = 4 - set type = none - end - subsection bc 3 - set id = 5 - set type = none - end - subsection bc 4 - set id = 6 - set type = none - end - # Gaz region - subsection bc 5 - set id = 7 - set type = none - end - subsection bc 6 - set id = 8 - set type = none - end - subsection bc 7 - set id = 9 - set type = none - end - subsection bc 8 - set id = 10 - set type = none - end - subsection bc 9 - set id = 11 - set type = none - end -end - -#--------------------------------------------------- -# Initial condition -#--------------------------------------------------- - -subsection initial conditions - set type = nodal - subsection uvwp - set Function expression = 0; 0; 0; 0 - end - subsection VOF - set Function expression = if (y<0.43 , 1, 0) - subsection projection step - set enable = false - set diffusion factor = 1 - end - end - subsection temperature - set Function expression = 298 - end -end - -#--------------------------------------------------- -# Physical Properties -#--------------------------------------------------- - -subsection physical properties - set number of fluids = 2 - subsection fluid 1 - set density = 4420e-9 # M*L^-3 - - set thermal conductivity model = phase_change - set thermal expansion model = phase_change - set rheological model = phase_change - set specific heat model = phase_change - - subsection phase change - set latent enthalpy = 290000e6 # L^2*T^-2 - set liquidus temperature = 1928.0 # Theta - set solidus temperature = 1878.0 # Theta - set viscosity liquid = 0.905 # L^2*T^-1 - set viscosity solid = 90500 # L^2*T^-1 - set thermal conductivity liquid = 28.8e3 # M*L*T^-3*Theta^-1 - set thermal conductivity solid = 28.8e3 # M*L*T^-3*Theta^-1 - set specific heat liquid = 1126e6 # L^2*Theta^-1*T^-2 - set specific heat solid = 800e6 # L^2*Theta^-1*T^-2 - end - end - - subsection fluid 0 - set density = 1.784e-9 # M*L^-3 - set kinematic viscosity = 56.1 # L^2*T^-1 - set thermal conductivity = 0.018e3 # M*L*T^-3*Theta^-1 - set specific heat = 520e6 # L^2*Theta^-1*T^-2 - end - - set number of material interactions = 1 - subsection material interaction 0 - set type = fluid-fluid - subsection fluid-fluid interaction - set first fluid id = 0 - set second fluid id = 1 - set surface tension model = phase change - set surface tension coefficient = 1.52 # M*T^-2 - set reference state temperature = 1928 - set temperature-driven surface tension gradient = -5.5e-4 # M*T^-2*Theta^-1 - set liquidus temperature = 1928 # Theta - set solidus temperature = 1878 # Theta - end - end -end - -#--------------------------------------------------- -# Laser parameters -#--------------------------------------------------- - -subsection laser parameters - set enable = true - set type = gaussian_heat_flux_vof_interface - set concentration factor = 2 - set power = 156e6 # M*L^2*T^-3 - set absorptivity = 0.35 - set penetration depth = 0.0 - set beam radius = 0.07 # L - set start time = 0 - set end time = 0.002 - set beam orientation = y- - subsection path - set Function expression = 0.3; 0.43; 0.0 - end -end - -#--------------------------------------------------- -# VOF -#--------------------------------------------------- - -subsection VOF - subsection phase filtration - set type = tanh - set beta = 20 - end - subsection interface sharpening - set enable = true - set interface sharpness = 1.5 - set frequency = 10 - set type = adaptive - set threshold max deviation = 0.4 - set max iterations = 50 - set monitored fluid = fluid 1 - set tolerance = 1e-7 - set verbosity = verbose - end - subsection surface tension force - set enable = true - set phase fraction gradient diffusion factor = 4 - set curvature diffusion factor = 1 - set output auxiliary fields = true - set enable marangoni effect = true - end -end - -#--------------------------------------------------- -# Evaporation -#--------------------------------------------------- - -subsection evaporation - set evaporation mass flux model = temperature_dependent - set enable evaporative cooling = true - set enable recoil pressure = true - set evaporation latent heat = 8.9e12 # L^2*T^-2 - set molar mass = 4.58e-2 - set boiling temperature = 3550 - set evaporation coefficient = 0.82 - set recoil pressure coefficient = 0.56 - set ambient pressure = 101325e-3 - set liquid density = 4420.0e-9 - set universal gas constant = 8.314e6 -end - -#--------------------------------------------------- -# Post-processing -#--------------------------------------------------- - -subsection post-processing - set verbosity = verbose - set calculate mass conservation = true -end - -#--------------------------------------------------- -# Non-Linear Solver Control -#--------------------------------------------------- - -subsection non-linear solver - subsection fluid dynamics - set tolerance = 1e-4 - set max iterations = 20 - set verbosity = verbose - end - subsection heat transfer - set tolerance = 100 - set max iterations = 20 - set verbosity = verbose - end - subsection VOF - set tolerance = 1e-4 - set max iterations = 20 - set verbosity = verbose - end -end - -#--------------------------------------------------- -# Linear Solver Control -#--------------------------------------------------- - -subsection linear solver - subsection fluid dynamics - set verbosity = verbose - set method = gmres - set relative residual = 1e-3 - set minimum residual = 1e-6 - set preconditioner = ilu - set ilu preconditioner fill = 0 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 - end - subsection heat transfer - set verbosity = verbose - set method = gmres - set relative residual = 1e-1 - set minimum residual = 1 - set preconditioner = ilu - set ilu preconditioner fill = 0 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 - end - subsection VOF - set verbosity = verbose - set method = gmres - set relative residual = 1e-3 - set minimum residual = 1e-10 - set preconditioner = ilu - set ilu preconditioner fill = 0 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 - end -end - -#--------------------------------------------------- -# Restart -#--------------------------------------------------- - -subsection restart - set checkpoint = true - set frequency = 500 - set filename = restart - set restart = false -end - -#--------------------------------------------------- -# Timer -#--------------------------------------------------- - -subsection timer - set type = iteration -end diff --git a/examples/multiphysics/laser-powder-bed-fusion/mesh/3d-benchmark.msh b/examples/multiphysics/laser-powder-bed-fusion/mesh/3d-benchmark.msh deleted file mode 100644 index 1a629e0b6d..0000000000 --- a/examples/multiphysics/laser-powder-bed-fusion/mesh/3d-benchmark.msh +++ /dev/null @@ -1,311 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat - -$Nodes -125 - 1 0 0.6 -0.3 - 2 0.15 0.6 -0.3 - 3 0.3 0.6 -0.3 - 4 0.45 0.6 -0.3 - 5 0.6 0.6 -0.3 - 6 0 0.6 -0.15 - 7 0.1499999999999999 0.5999999999999998 -0.15 - 8 0.2999999999999999 0.5999999999999998 -0.15 - 9 0.45 0.5999999999999998 -0.15 - 10 0.6 0.6 -0.15 - 11 0 0.6 0 - 12 0.15 0.6 0 - 13 0.3 0.6 0 - 14 0.45 0.6 0 - 15 0.6 0.6 0 - 16 0 0.6 0.15 - 17 0.15 0.6 0.15 - 18 0.3 0.6 0.15 - 19 0.45 0.6 0.15 - 20 0.6 0.6 0.15 - 21 0 0.6 0.3 - 22 0.15 0.6 0.3 - 23 0.3 0.6 0.3 - 24 0.45 0.6 0.3 - 25 0.6 0.6 0.3 - 26 0 0.45 -0.3 - 27 0.15 0.45 -0.3 - 28 0.3 0.45 -0.3 - 29 0.45 0.45 -0.3 - 30 0.6 0.45 -0.3 - 31 0 0.45 -0.15 - 32 0.15 0.4500000000000001 -0.15 - 33 0.2999999999999999 0.45 -0.15 - 34 0.45 0.4500000000000001 -0.15 - 35 0.6 0.45 -0.15 - 36 0 0.45 0 - 37 0.15 0.4500000000000001 0 - 38 0.3 0.4500000000000001 0 - 39 0.45 0.4500000000000001 0 - 40 0.6 0.45 0 - 41 0 0.45 0.15 - 42 0.15 0.4500000000000001 0.15 - 43 0.3 0.4500000000000001 0.15 - 44 0.45 0.4500000000000001 0.15 - 45 0.6 0.45 0.15 - 46 0 0.45 0.3 - 47 0.15 0.45 0.3 - 48 0.3 0.45 0.3 - 49 0.45 0.45 0.3 - 50 0.6 0.45 0.3 - 51 0 0.3 -0.3 - 52 0.15 0.3 -0.3 - 53 0.3 0.3 -0.3 - 54 0.45 0.3 -0.3 - 55 0.6 0.3 -0.3 - 56 0 0.3 -0.15 - 57 0.1499999999999999 0.3 -0.15 - 58 0.2999999999999998 0.3000000000000001 -0.15 - 59 0.45 0.3 -0.15 - 60 0.5999999999999998 0.3 -0.15 - 61 0 0.3 0 - 62 0.15 0.3000000000000001 0 - 63 0.3 0.3000000000000001 0 - 64 0.45 0.3000000000000001 0 - 65 0.6 0.3 0 - 66 0 0.3 0.15 - 67 0.15 0.2999999999999999 0.15 - 68 0.3 0.3000000000000001 0.15 - 69 0.4500000000000001 0.3000000000000001 0.15 - 70 0.6 0.3 0.15 - 71 0 0.3 0.3 - 72 0.15 0.3 0.3 - 73 0.3 0.3 0.3 - 74 0.45 0.3 0.3 - 75 0.6 0.3 0.3 - 76 0 0.15 -0.3 - 77 0.15 0.15 -0.3 - 78 0.3 0.15 -0.3 - 79 0.45 0.15 -0.3 - 80 0.6 0.15 -0.3 - 81 0 0.15 -0.15 - 82 0.1499999999999999 0.15 -0.15 - 83 0.2999999999999998 0.15 -0.15 - 84 0.45 0.15 -0.15 - 85 0.5999999999999998 0.15 -0.15 - 86 0 0.15 0 - 87 0.15 0.15 0 - 88 0.3 0.15 0 - 89 0.45 0.15 0 - 90 0.6 0.15 0 - 91 0 0.15 0.15 - 92 0.15 0.15 0.15 - 93 0.3 0.15 0.15 - 94 0.45 0.15 0.15 - 95 0.6 0.15 0.15 - 96 0 0.15 0.3 - 97 0.15 0.15 0.3 - 98 0.3 0.15 0.3 - 99 0.45 0.15 0.3 -100 0.6 0.15 0.3 -101 0 0 -0.3 -102 0.15 0 -0.3 -103 0.3 0 -0.3 -104 0.45 0 -0.3 -105 0.6 0 -0.3 -106 0 0 -0.15 -107 0.1499999999999999 0 -0.15 -108 0.2999999999999999 0 -0.15 -109 0.45 0 -0.15 -110 0.6 0 -0.15 -111 0 0 0 -112 0.15 0 0 -113 0.3 0 0 -114 0.45 0 0 -115 0.6 0 0 -116 0 0 0.15 -117 0.15 0 0.15 -118 0.3 0 0.15 -119 0.45 0 0.15 -120 0.6 0 0.15 -121 0 0 0.3 -122 0.15 0 0.3 -123 0.3 0 0.3 -124 0.45 0 0.3 -125 0.6 0 0.3 -$EndNodes - -$Elements -160 - 1 5 2 1 1 1 2 7 6 26 27 32 31 - 2 5 2 1 1 2 3 8 7 27 28 33 32 - 3 5 2 1 1 3 4 9 8 28 29 34 33 - 4 5 2 1 1 4 5 10 9 29 30 35 34 - 5 5 2 1 1 6 7 12 11 31 32 37 36 - 6 5 2 1 1 7 8 13 12 32 33 38 37 - 7 5 2 1 1 8 9 14 13 33 34 39 38 - 8 5 2 1 1 9 10 15 14 34 35 40 39 - 9 5 2 1 1 11 12 17 16 36 37 42 41 - 10 5 2 1 1 12 13 18 17 37 38 43 42 - 11 5 2 1 1 13 14 19 18 38 39 44 43 - 12 5 2 1 1 14 15 20 19 39 40 45 44 - 13 5 2 1 1 16 17 22 21 41 42 47 46 - 14 5 2 1 1 17 18 23 22 42 43 48 47 - 15 5 2 1 1 18 19 24 23 43 44 49 48 - 16 5 2 1 1 19 20 25 24 44 45 50 49 - 17 5 2 1 1 26 27 32 31 51 52 57 56 - 18 5 2 1 1 27 28 33 32 52 53 58 57 - 19 5 2 1 1 28 29 34 33 53 54 59 58 - 20 5 2 1 1 29 30 35 34 54 55 60 59 - 21 5 2 1 1 31 32 37 36 56 57 62 61 - 22 5 2 1 1 32 33 38 37 57 58 63 62 - 23 5 2 1 1 33 34 39 38 58 59 64 63 - 24 5 2 1 1 34 35 40 39 59 60 65 64 - 25 5 2 1 1 36 37 42 41 61 62 67 66 - 26 5 2 1 1 37 38 43 42 62 63 68 67 - 27 5 2 1 1 38 39 44 43 63 64 69 68 - 28 5 2 1 1 39 40 45 44 64 65 70 69 - 29 5 2 1 1 41 42 47 46 66 67 72 71 - 30 5 2 1 1 42 43 48 47 67 68 73 72 - 31 5 2 1 1 43 44 49 48 68 69 74 73 - 32 5 2 1 1 44 45 50 49 69 70 75 74 - 33 5 2 1 1 51 52 57 56 76 77 82 81 - 34 5 2 1 1 52 53 58 57 77 78 83 82 - 35 5 2 1 1 53 54 59 58 78 79 84 83 - 36 5 2 1 1 54 55 60 59 79 80 85 84 - 37 5 2 1 1 56 57 62 61 81 82 87 86 - 38 5 2 1 1 57 58 63 62 82 83 88 87 - 39 5 2 1 1 58 59 64 63 83 84 89 88 - 40 5 2 1 1 59 60 65 64 84 85 90 89 - 41 5 2 1 1 61 62 67 66 86 87 92 91 - 42 5 2 1 1 62 63 68 67 87 88 93 92 - 43 5 2 1 1 63 64 69 68 88 89 94 93 - 44 5 2 1 1 64 65 70 69 89 90 95 94 - 45 5 2 1 1 66 67 72 71 91 92 97 96 - 46 5 2 1 1 67 68 73 72 92 93 98 97 - 47 5 2 1 1 68 69 74 73 93 94 99 98 - 48 5 2 1 1 69 70 75 74 94 95 100 99 - 49 5 2 1 1 76 77 82 81 101 102 107 106 - 50 5 2 1 1 77 78 83 82 102 103 108 107 - 51 5 2 1 1 78 79 84 83 103 104 109 108 - 52 5 2 1 1 79 80 85 84 104 105 110 109 - 53 5 2 1 1 81 82 87 86 106 107 112 111 - 54 5 2 1 1 82 83 88 87 107 108 113 112 - 55 5 2 1 1 83 84 89 88 108 109 114 113 - 56 5 2 1 1 84 85 90 89 109 110 115 114 - 57 5 2 1 1 86 87 92 91 111 112 117 116 - 58 5 2 1 1 87 88 93 92 112 113 118 117 - 59 5 2 1 1 88 89 94 93 113 114 119 118 - 60 5 2 1 1 89 90 95 94 114 115 120 119 - 61 5 2 1 1 91 92 97 96 116 117 122 121 - 62 5 2 1 1 92 93 98 97 117 118 123 122 - 63 5 2 1 1 93 94 99 98 118 119 124 123 - 64 5 2 1 1 94 95 100 99 119 120 125 124 - 65 3 2 2 2 101 106 107 102 - 66 3 2 2 2 102 107 108 103 - 67 3 2 2 2 103 108 109 104 - 68 3 2 2 2 104 109 110 105 - 69 3 2 2 2 106 111 112 107 - 70 3 2 2 2 107 112 113 108 - 71 3 2 2 2 108 113 114 109 - 72 3 2 2 2 109 114 115 110 - 73 3 2 2 2 111 116 117 112 - 74 3 2 2 2 112 117 118 113 - 75 3 2 2 2 113 118 119 114 - 76 3 2 2 2 114 119 120 115 - 77 3 2 2 2 116 121 122 117 - 78 3 2 2 2 117 122 123 118 - 79 3 2 2 2 118 123 124 119 - 80 3 2 2 2 119 124 125 120 - 81 3 2 3 3 76 101 102 77 - 82 3 2 3 3 77 102 103 78 - 83 3 2 3 3 78 103 104 79 - 84 3 2 3 3 79 104 105 80 - 85 3 2 3 3 51 76 77 52 - 86 3 2 3 3 52 77 78 53 - 87 3 2 3 3 53 78 79 54 - 88 3 2 3 3 54 79 80 55 - 89 3 2 3 3 26 51 52 27 - 90 3 2 3 3 27 52 53 28 - 91 3 2 3 3 28 53 54 29 - 92 3 2 3 3 29 54 55 30 - 93 3 2 4 4 97 122 121 96 - 94 3 2 4 4 98 123 122 97 - 95 3 2 4 4 99 124 123 98 - 96 3 2 4 4 100 125 124 99 - 97 3 2 4 4 72 97 96 71 - 98 3 2 4 4 73 98 97 72 - 99 3 2 4 4 74 99 98 73 -100 3 2 4 4 75 100 99 74 -101 3 2 4 4 47 72 71 46 -102 3 2 4 4 48 73 72 47 -103 3 2 4 4 49 74 73 48 -104 3 2 4 4 50 75 74 49 -105 3 2 5 5 26 31 56 51 -106 3 2 5 5 51 56 81 76 -107 3 2 5 5 76 81 106 101 -108 3 2 5 5 31 36 61 56 -109 3 2 5 5 56 61 86 81 -110 3 2 5 5 81 86 111 106 -111 3 2 5 5 36 41 66 61 -112 3 2 5 5 61 66 91 86 -113 3 2 5 5 86 91 116 111 -114 3 2 5 5 41 46 71 66 -115 3 2 5 5 66 71 96 91 -116 3 2 5 5 91 96 121 116 -117 3 2 6 6 30 55 60 35 -118 3 2 6 6 55 80 85 60 -119 3 2 6 6 80 105 110 85 -120 3 2 6 6 35 60 65 40 -121 3 2 6 6 60 85 90 65 -122 3 2 6 6 85 110 115 90 -123 3 2 6 6 40 65 70 45 -124 3 2 6 6 65 90 95 70 -125 3 2 6 6 90 115 120 95 -126 3 2 6 6 45 70 75 50 -127 3 2 6 6 70 95 100 75 -128 3 2 6 6 95 120 125 100 -129 3 2 7 7 1 2 7 6 -130 3 2 7 7 2 3 8 7 -131 3 2 7 7 3 4 9 8 -132 3 2 7 7 4 5 10 9 -133 3 2 7 7 6 7 12 11 -134 3 2 7 7 7 8 13 12 -135 3 2 7 7 8 9 14 13 -136 3 2 7 7 9 10 15 14 -137 3 2 7 7 11 12 17 16 -138 3 2 7 7 12 13 18 17 -139 3 2 7 7 13 14 19 18 -140 3 2 7 7 14 15 20 19 -141 3 2 7 7 16 17 22 21 -142 3 2 7 7 17 18 23 22 -143 3 2 7 7 18 19 24 23 -144 3 2 7 7 19 20 25 24 -145 3 2 8 8 1 26 27 2 -146 3 2 8 8 2 27 28 3 -147 3 2 8 8 3 28 29 4 -148 3 2 8 8 4 29 30 5 -149 3 2 9 9 22 47 46 21 -150 3 2 9 9 23 48 47 22 -151 3 2 9 9 24 49 48 23 -152 3 2 9 9 25 50 49 24 -153 3 2 10 10 1 6 31 26 -154 3 2 10 10 6 11 36 31 -155 3 2 10 10 11 16 41 36 -156 3 2 10 10 16 21 46 41 -157 3 2 11 11 5 30 35 10 -158 3 2 11 11 10 35 40 15 -159 3 2 11 11 15 40 45 20 -160 3 2 11 11 20 45 50 25 -$EndElements - -$PhysicalNames -11 -3 1 "Unspecified" -2 2 "bottom" -2 3 "bottom-back" -2 4 "bottom-front" -2 5 "bottom-left" -2 6 "bottom-right" -2 7 "top" -2 8 "top-back" -2 9 "top-front" -2 10 "top-left" -2 11 "top-right" -$EndPhysicalNames diff --git a/examples/multiphysics/laser-powder-bed-fusion/2D/benchmark.prm b/examples/multiphysics/static-irradiation/2D/static-irradiation.prm similarity index 59% rename from examples/multiphysics/laser-powder-bed-fusion/2D/benchmark.prm rename to examples/multiphysics/static-irradiation/2D/static-irradiation.prm index 2241043caf..c4ec3422fb 100644 --- a/examples/multiphysics/laser-powder-bed-fusion/2D/benchmark.prm +++ b/examples/multiphysics/static-irradiation/2D/static-irradiation.prm @@ -11,14 +11,15 @@ set dimension = 2 #--------------------------------------------------- subsection simulation control - set method = bdf2 - set output frequency = 100 - set output path = ./output/ - set time end = 0.002 + set method = bdf1 + set time end = 0.0005 set time step = 1.9e-8 - set max cfl = 0.75 - set max time step = 1.9e-8 set adapt = true + set max cfl = 0.06 + set max time step = 1.9e-8 + set output name = static-irradiation + set output path = output/ + set output frequency = 100 end #--------------------------------------------------- @@ -36,16 +37,15 @@ end subsection mesh set type = gmsh - set file name = ../mesh/2d-benchmark.msh + set file name = ../mesh/bare-plate-2D.msh set initial refinement = 4 end subsection box refinement subsection mesh - set type = dealii - set grid type = subdivided_hyper_rectangle - set grid arguments = 8,1 : 0,0.3925: 0.6,0.4675: false - set initial refinement = 0 + set type = dealii + set grid type = subdivided_hyper_rectangle + set grid arguments = 8,1 : 0,0.3925: 0.6,0.4675: false end set initial refinement = 3 end @@ -55,16 +55,14 @@ end #--------------------------------------------------- subsection mesh adaptation - set type = kelly - set variable = temperature - set fraction type = fraction - set mesh refinement controller = false - set max refinement level = 7 - set min refinement level = 4 - set frequency = 20 - set fraction refinement = 0.4 - set fraction coarsening = 0.0 - set initial refinement steps = 0 + set type = kelly + set variable = temperature + set fraction type = fraction + set max refinement level = 7 + set min refinement level = 4 + set frequency = 20 + set fraction refinement = 0.4 + set fraction coarsening = 0.0 end #--------------------------------------------------- @@ -84,6 +82,7 @@ subsection boundary conditions subsection bc 2 set id = 6 set type = outlet + set beta = 0 end subsection bc 3 set id = 7 @@ -93,7 +92,7 @@ subsection boundary conditions set id = 4 set type = function subsection u - set Function expression = 0.1 + set Function expression = 100.0 end subsection v set Function expression = 0 @@ -141,6 +140,30 @@ end subsection boundary conditions VOF set number = 6 + subsection bc 0 + set id = 2 + set type = none + end + subsection bc 1 + set id = 5 + set type = none + end + subsection bc 2 + set id = 6 + set type = none + end + subsection bc 3 + set id = 7 + set type = none + end + subsection bc 4 + set id = 4 + set type = none + end + subsection bc 5 + set id = 3 + set type = none + end end #--------------------------------------------------- @@ -171,48 +194,31 @@ end subsection physical properties set number of fluids = 2 subsection fluid 1 - set density = 4420e-9 # M*L^-3 + set density = 4.42e-6 + set thermal conductivity = 2.88e4 - set thermal conductivity model = phase_change - set thermal expansion model = phase_change - set rheological model = phase_change - set specific heat model = phase_change + set thermal expansion model = phase_change + set rheological model = phase_change + set specific heat model = phase_change subsection phase change - # Enthalpy of the phase change - set latent enthalpy = 290000e6 # L^2*T^-2 - - # Temperature of the liquidus - set liquidus temperature = 1928.0 # Theta - - # Temperature of the solidus - set solidus temperature = 1878.0 # Theta + set liquidus temperature = 1928.0 + set solidus temperature = 1878.0 - # viscosity of the liquid phase - set viscosity liquid = 0.905 # L^2*T^-1 + set viscosity liquid = 0.905 + set viscosity solid = 9.05e4 - # viscosity of the solid phase - set viscosity solid = 90500 # L^2*T^-1 - - # thermal conductivity of the liquid phase - set thermal conductivity liquid = 28.8e3 # M*L*T^-3*Theta^-1 - - # thermal conductivity of the solid phase - set thermal conductivity solid = 28.8e3 # M*L*T^-3*Theta^-1 - - # Specific heat of the liquid phase - set specific heat liquid = 1126e6 # L^2*Theta^-1*T^-2 - - # Specific heat of the solid phase - set specific heat solid = 800e6 # L^2*Theta^-1*T^-2 + set specific heat liquid = 1.126e9 + set specific heat solid = 0.8e9 + set latent enthalpy = 2.9e11 end end subsection fluid 0 - set density = 1.784e-9 # M*L^-3 - set kinematic viscosity = 56.1 # L^2*T^-1 - set thermal conductivity = 0.018e3 # M*L*T^-3*Theta^-1 - set specific heat = 520e6 # L^2*Theta^-1*T^-2 + set density = 1.784e-9 + set thermal conductivity = 18 + set kinematic viscosity = 56.1 + set specific heat = 5.20e8 end set number of material interactions = 1 @@ -222,11 +228,11 @@ subsection physical properties set first fluid id = 0 set second fluid id = 1 set surface tension model = phase change - set surface tension coefficient = 1.52 # M*T^-2 - set reference state temperature = 1928 - set temperature-driven surface tension gradient = -5.5e-4 # M*T^-2*Theta^-1 - set liquidus temperature = 1928 # Theta - set solidus temperature = 1878 # Theta + set surface tension coefficient = 1.52 + set reference state temperature = 1928.0 + set temperature-driven surface tension gradient = -5.5e-4 + set liquidus temperature = 1928.0 + set solidus temperature = 1878.0 end end end @@ -236,16 +242,14 @@ end #--------------------------------------------------- subsection laser parameters - set enable = true - set type = gaussian_heat_flux_vof_interface - set concentration factor = 2 - set power = 156e6 # M*L^2*T^-3 - set absorptivity = 0.35 - set penetration depth = 0.0 - set beam radius = 0.07 # L - set start time = 0 - set end time = 0.002 - set beam orientation = y- + set enable = true + set type = gaussian_heat_flux_vof_interface + set power = 156e6 + set absorptivity = 0.35 + set beam radius = 0.07 + set start time = 0 + set end time = 0.002 + set beam orientation = y- subsection path set Function expression = 0.3; 0.43 end @@ -263,6 +267,7 @@ subsection VOF end subsection interface sharpening set enable = true + set threshold = 0.5 set interface sharpness = 1.5 set frequency = 10 set type = adaptive @@ -289,15 +294,14 @@ subsection evaporation set evaporation mass flux model = temperature_dependent set enable evaporative cooling = true set enable recoil pressure = true - set evaporation latent heat = 8.9e12 # L^2*T^-2 - set molar mass = 4.58e-2 - set boiling temperature = 3550 set evaporation coefficient = 0.82 set recoil pressure coefficient = 0.56 - set ambient pressure = 101325e-3 - set liquid density = 4420.0e-9 + set evaporation latent heat = 8.9e12 + set molar mass = 4.58e-2 set universal gas constant = 8.314e6 + set boiling temperature = 3550.0 + set ambient pressure = 101.325 end #--------------------------------------------------- @@ -337,44 +341,45 @@ end subsection linear solver subsection fluid dynamics - set verbosity = verbose - set method = gmres - set relative residual = 1e-3 - set minimum residual = 1e-6 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 + set verbosity = verbose + set method = gmres + set relative residual = 1e-3 + set minimum residual = 1e-5 + set preconditioner = amg end subsection heat transfer - set verbosity = verbose - set method = gmres - set relative residual = 1e-2 - set minimum residual = 1e-1 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 + set verbosity = verbose + set method = gmres + set relative residual = 1e-2 + set minimum residual = 1e-1 + set preconditioner = ilu + set ilu preconditioner fill = 1 end subsection VOF - set verbosity = verbose - set method = gmres - set relative residual = 1e-3 - set minimum residual = 1e-5 - set preconditioner = ilu - set ilu preconditioner fill = 1 - set ilu preconditioner absolute tolerance = 1e-12 - set ilu preconditioner relative tolerance = 1.00 + set verbosity = verbose + set method = gmres + set relative residual = 1e-3 + set minimum residual = 1e-5 + set preconditioner = ilu + set ilu preconditioner fill = 1 end end +#--------------------------------------------------- +# Restart +#--------------------------------------------------- + subsection restart set checkpoint = true - set frequency = 500 + set frequency = 100 set filename = restart set restart = false end +#--------------------------------------------------- +# Timer +#--------------------------------------------------- + subsection timer set type = iteration end diff --git a/examples/multiphysics/laser-powder-bed-fusion/mesh/2d-benchmark.msh b/examples/multiphysics/static-irradiation/mesh/bare-plate-2D.msh similarity index 100% rename from examples/multiphysics/laser-powder-bed-fusion/mesh/2d-benchmark.msh rename to examples/multiphysics/static-irradiation/mesh/bare-plate-2D.msh