Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
PhaseChangeCarmanKozenyCLSAssembler< dim > Class Template Reference

#include <navier_stokes_cls_assemblers.h>

Inheritance diagram for PhaseChangeCarmanKozenyCLSAssembler< dim >:
[legend]

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 > &copy_data) override
virtual void assemble_rhs (const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_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

Detailed Description

template<int dim>
class PhaseChangeCarmanKozenyCLSAssembler< dim >

Assembler of the non-linear Carman-Kozeny permeability model for CLS simulations with phase change.

Template Parameters
dimAn integer that denotes the number of spatial dimensions

Definition at line 181 of file navier_stokes_cls_assemblers.h.

Constructor & Destructor Documentation

◆ PhaseChangeCarmanKozenyCLSAssembler()

template<int dim>
PhaseChangeCarmanKozenyCLSAssembler< dim >::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 )
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.

Parameters
[in]fluid_with_phase_changeIndicates which fluid(s) has/have phase change.
[in]carman_kozeny_permeability_areaVector of permeability area values of the solids (pseudo-porous media).
[in]carman_kozeny_toleranceVector of tolerances to avoid division by zero in the solid regions.
[in]phase_change_parameters_vectorVector 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.

Member Function Documentation

◆ assemble_matrix()

template<int dim>
void PhaseChangeCarmanKozenyCLSAssembler< dim >::assemble_matrix ( const NavierStokesScratchData< dim > & scratch_data,
StabilizedMethodsTensorCopyData< dim > & copy_data )
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.

Parameters
[in]scratch_dataScratch 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_dataDestination 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.

◆ assemble_rhs()

template<int dim>
void PhaseChangeCarmanKozenyCLSAssembler< dim >::assemble_rhs ( const NavierStokesScratchData< dim > & scratch_data,
StabilizedMethodsTensorCopyData< dim > & copy_data )
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.

Parameters
[in]scratch_dataScratch 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_dataDestination 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.

◆ compute_permeability_area_inverse()

template<int dim>
std::vector< double > PhaseChangeCarmanKozenyCLSAssembler< dim >::compute_permeability_area_inverse ( const std::vector< double > & carman_kozeny_permeability_area)
inlinestaticprivate

Compute the inverse values of the Carman-Kozeny permeability areas.

Parameters
[in]carman_kozeny_permeability_areaVector of the Carman-Kozeny permeability area values.
Returns
Vector of inverse values of the Carman-Kozeny permeability areas.

Definition at line 277 of file navier_stokes_cls_assemblers.h.

◆ indentify_fluid_with_phase_change()

template<int dim>
std::vector< bool > PhaseChangeCarmanKozenyCLSAssembler< dim >::indentify_fluid_with_phase_change ( const Parameters::FluidIndicator fluid_with_phase_change,
const unsigned int n_fluids )
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.

Parameters
[in]fluid_with_phase_changeIndicates which fluid(s) has/have phase change.
[in]n_fluidsNumber of fluids.
Returns
Vector of boolean indicating which fluid(s) has/have phase change.

Definition at line 302 of file navier_stokes_cls_assemblers.h.

References Parameters::fluid_0, and Parameters::fluid_1.

Member Data Documentation

◆ carman_kozeny_permeability_area_inv

template<int dim>
const std::vector<double> PhaseChangeCarmanKozenyCLSAssembler< dim >::carman_kozeny_permeability_area_inv
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.

◆ carman_kozeny_tolerance

template<int dim>
const std::vector<double> PhaseChangeCarmanKozenyCLSAssembler< dim >::carman_kozeny_tolerance
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.

◆ fluid_has_phase_change

template<int dim>
const std::vector<bool> PhaseChangeCarmanKozenyCLSAssembler< dim >::fluid_has_phase_change
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.

◆ phase_change_parameters_vector

template<int dim>
const std::vector<Parameters::PhaseChange> PhaseChangeCarmanKozenyCLSAssembler< dim >::phase_change_parameters_vector
private

Phase change parameters for the liquidus and solidus temperature of each fluid.

Definition at line 339 of file navier_stokes_cls_assemblers.h.


The documentation for this class was generated from the following files: