![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <navier_stokes_cls_assemblers.h>
Public Member Functions | |
| PhaseChangeCarmanKozenyCLSAssembler (const Parameters::FluidIndicator &fluid_with_phase_change, const std::vector< double > &carman_kozeny_permeability_area, const std::vector< double > &carman_kozeny_tolerance, const std::vector< Parameters::PhaseChange > &phase_change_parameters_vector) | |
| virtual void | assemble_matrix (const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > ©_data) override |
| virtual void | assemble_rhs (const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > ©_data) override |
| Public Member Functions inherited from PhysicsAssemblerBase< NavierStokesScratchData< dim >, StabilizedMethodsTensorCopyData< dim > > | |
| virtual | ~PhysicsAssemblerBase ()=default |
Static Private Member Functions | |
| static std::vector< double > | compute_permeability_area_inverse (const std::vector< double > &carman_kozeny_permeability_area) |
| static std::vector< bool > | indentify_fluid_with_phase_change (const Parameters::FluidIndicator fluid_with_phase_change, const unsigned int n_fluids) |
Private Attributes | |
| const std::vector< bool > | fluid_has_phase_change |
| const std::vector< double > | carman_kozeny_permeability_area_inv |
| const std::vector< double > | carman_kozeny_tolerance |
| const std::vector< Parameters::PhaseChange > | phase_change_parameters_vector |
Assembler of the non-linear Carman-Kozeny permeability model for CLS simulations with phase change.
| dim | An integer that denotes the number of spatial dimensions |
Definition at line 181 of file navier_stokes_cls_assemblers.h.
|
inline |
Assembler for the Carman-Kozeny permeability source term used for phase change modelling.
\[\boldsymbol{F}_\mathrm{Carman-Kozeny} = \frac{-\mu}{A_\mathrm{perm}} \left[ \frac{(1-\alpha_\mathrm{l})^2}{(\alpha_\mathrm{l})^3 + \delta}\right] \boldsymbol{u} \]
with \(\mu\) the dynamic viscosity, \(A_\mathrm{perm}\) the permeability area, \(\alpha_\mathrm{l}\) the liquid fraction, \(\delta\) a tolerance to avoid division by zero in the solid, and \(\boldsymbol{u}\) the velocity.
| [in] | fluid_with_phase_change | Indicates which fluid(s) has/have phase change. |
| [in] | carman_kozeny_permeability_area | Vector of permeability area values of the solids (pseudo-porous media). |
| [in] | carman_kozeny_tolerance | Vector of tolerances to avoid division by zero in the solid regions. |
| [in] | phase_change_parameters_vector | Vector of phase change parameters of all fluids. |
Definition at line 209 of file navier_stokes_cls_assemblers.h.
References carman_kozeny_permeability_area_inv, carman_kozeny_tolerance, compute_permeability_area_inverse(), fluid_has_phase_change, indentify_fluid_with_phase_change(), and phase_change_parameters_vector.
|
overridevirtual |
Assembles the matrix of:
\[\boldsymbol{F}_\mathrm{Carman-Kozeny} = \frac{-\mu}{A_\mathrm{perm}} \left[ \frac{(1-\alpha_\mathrm{l})^2}{(\alpha_\mathrm{l})^3 + \delta}\right] \boldsymbol{u} \]
with \(\mu\) the dynamic viscosity, \(A_\mathrm{perm}\) the permeability area, \(\alpha_\mathrm{l}\) the liquid fraction, \(\delta\) a tolerance to avoid division by zero in the solid, and \(\boldsymbol{u}\) the velocity.
| [in] | scratch_data | Scratch data containing the information required for system assembly. It is important to note that the scratch data has to have been re-inited before calling for matrix assembly. |
| [in,out] | copy_data | Destination where the local_matrix is copied to. |
Implements PhysicsAssemblerBase< NavierStokesScratchData< dim >, StabilizedMethodsTensorCopyData< dim > >.
Definition at line 631 of file navier_stokes_cls_assemblers.cc.
References carman_kozeny_permeability_area_inv, carman_kozeny_tolerance, NavierStokesScratchData< dim >::dynamic_viscosity_0, NavierStokesScratchData< dim >::dynamic_viscosity_1, NavierStokesScratchData< dim >::filtered_phase_values, fluid_has_phase_change, NavierStokesScratchData< dim >::JxW, StabilizedMethodsTensorCopyData< dim >::local_matrix, NavierStokesScratchData< dim >::n_dofs, NavierStokesScratchData< dim >::n_q_points, phase_change_parameters_vector, NavierStokesScratchData< dim >::phi_u, StabilizedMethodsTensorCopyData< dim >::strong_jacobian, StabilizedMethodsTensorCopyData< dim >::strong_residual, temperature, NavierStokesScratchData< dim >::temperature_values, and NavierStokesScratchData< dim >::velocity_values.
|
overridevirtual |
Assemble the right-hand side (rhs) of:
\[\boldsymbol{F}_\mathrm{Carman-Kozeny} = \frac{-\mu}{A_\mathrm{perm}} \left[ \frac{(1-\alpha_\mathrm{l})^2}{(\alpha_\mathrm{l})^3 + \delta}\right] \boldsymbol{u} \]
with \(\mu\) the dynamic viscosity, \(A_\mathrm{perm}\) the permeability area, \(\alpha_\mathrm{l}\) the liquid fraction, \(\delta\) a tolerance to avoid division by zero in the solid, and \(\boldsymbol{u}\) the velocity.
| [in] | scratch_data | Scratch data containing the information required for system assembly. It is important to note that the scratch data has to have been re-inited before calling for rhs assembly. |
| [in,out] | copy_data | Destination where the local_rhs is copied to. |
Implements PhysicsAssemblerBase< NavierStokesScratchData< dim >, StabilizedMethodsTensorCopyData< dim > >.
Definition at line 724 of file navier_stokes_cls_assemblers.cc.
References carman_kozeny_permeability_area_inv, carman_kozeny_tolerance, NavierStokesScratchData< dim >::dynamic_viscosity_0, NavierStokesScratchData< dim >::dynamic_viscosity_1, NavierStokesScratchData< dim >::filtered_phase_values, fluid_has_phase_change, NavierStokesScratchData< dim >::JxW, StabilizedMethodsTensorCopyData< dim >::local_rhs, NavierStokesScratchData< dim >::n_dofs, NavierStokesScratchData< dim >::n_q_points, phase_change_parameters_vector, NavierStokesScratchData< dim >::phi_u, StabilizedMethodsTensorCopyData< dim >::strong_residual, temperature, NavierStokesScratchData< dim >::temperature_values, and NavierStokesScratchData< dim >::velocity_values.
|
inlinestaticprivate |
Compute the inverse values of the Carman-Kozeny permeability areas.
| [in] | carman_kozeny_permeability_area | Vector of the Carman-Kozeny permeability area values. |
Definition at line 277 of file navier_stokes_cls_assemblers.h.
|
inlinestaticprivate |
Checks which fluid(s) has/have phase change and returns a vector of boolean indicating if each fluid has phase change (true) or not (false). The indices of the vector correspond to the fluid ID.
| [in] | fluid_with_phase_change | Indicates which fluid(s) has/have phase change. |
| [in] | n_fluids | Number of fluids. |
Definition at line 302 of file navier_stokes_cls_assemblers.h.
References Parameters::fluid_0, and Parameters::fluid_1.
|
private |
Vector of one over the permeability area of the pseudo-porous bed (solid phase) for each simulated fluid.
Definition at line 327 of file navier_stokes_cls_assemblers.h.
|
private |
Vector of tolerances in the Carman-Kozeny source term that avoids division by zero in the solid phase for each simulated fluid.
Definition at line 333 of file navier_stokes_cls_assemblers.h.
|
private |
Vector where each bool indicates if the corresponding fluid has phase change or not.
Definition at line 321 of file navier_stokes_cls_assemblers.h.
|
private |
Phase change parameters for the liquidus and solidus temperature of each fluid.
Definition at line 339 of file navier_stokes_cls_assemblers.h.