FE solution of the Reynolds equation
This is the main module for the finite element solution of the Reynolds equation.
FE_FILM is a data structure containing a FE_MESH and some data describing a lubrication problem
This module can be used to create a FE_FILM, assemble the FE_FIM and solve it. Some post-treatements like fluxes, forces are available.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=I4), | public, | parameter | :: | H1_N | = | 1 | code for bottom surface height |
integer(kind=I4), | public, | parameter | :: | H2_N | = | 2 | code for top surface height |
integer(kind=I4), | public, | parameter | :: | H_N | = | 3 | code for film thickness |
integer(kind=I4), | public, | parameter | :: | P_N | = | 4 | code for film absolute pressure |
integer(kind=I4), | public, | parameter | :: | RHO_N | = | 5 | code for fluid density |
integer(kind=I4), | public, | parameter | :: | T_N | = | 6 | code for film absolute temperature |
integer(kind=I4), | public, | parameter | :: | DRHODP_N | = | 7 | code for film compressibility |
integer(kind=I4), | public, | parameter | :: | MU_N | = | 8 | code for fluid viscosity |
integer(kind=I4), | public, | parameter | :: | VX_N | = | 9 | code for surface velocity along . Should be modified (surfaces 1 and 2) |
integer(kind=I4), | public, | parameter | :: | VY_N | = | 10 | code for surface velocity along . Should be modified (surfaces 1 and 2) |
integer(kind=I4), | public, | parameter | :: | HG_C | = | 1 | code for groove depth on the stationnary surface , cell variable |
integer(kind=I4), | public, | parameter | :: | PEK_C | = | 2 | code for Peclet number along |
integer(kind=I4), | public, | parameter | :: | PEE_C | = | 3 | code for Peclet number along |
integer(kind=I4), | public, | parameter | :: | REY | = | 1 | code for imposed pressure at the boundary |
integer(kind=I4), | public, | parameter | :: | ASS | = | 1 | code for assembly of the system |
integer(kind=I4), | public, | parameter | :: | NO_ASS | = | 0 | code for no assemble, computation of the residual only |
integer(kind=I4), | public, | parameter | :: | NO_BC | = | -1 | code for computation of the residual everywhere, even at the boundaries (fluxes computations) |
type(SCALE_SURF), | private | :: | scal_tmp | object SCALE_SURF |
|||
logical(kind=I4), | public, | parameter | :: | BC_SPLINE | = | .false. | instead of linearly interpolating the boundary pressures, it can be done in a smoother way. NOT TO BE USED YET. |
PRC_TAB stores some precomputed coefficients for the finite element matrices
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=I4), | public | :: | ng | Gauss point number along a direction |
|||
real(kind=R8), | public, | dimension(:), allocatable | :: | pg | point coordinates in a direction |
||
real(kind=R8), | public, | dimension(:), allocatable | :: | wg | point weight |
||
real(kind=R8), | public, | dimension(:,:,:), allocatable | :: | vni4 | for each node, shape function at Gauss points |
||
real(kind=R8), | public, | dimension(:,:,:), allocatable | :: | vni4x | for each node, shape function derivative at Gauss points |
||
real(kind=R8), | public, | dimension(:,:,:), allocatable | :: | vni4y | for each node, shape function derivative at Gauss points |
||
real(kind=R8), | public, | dimension(:,:,:), allocatable | :: | vni4d | for each node, upwind shape function at Gauss points |
||
real(kind=R8), | public, | dimension(:,:,:), allocatable | :: | vcal | 14 values calculated at the Gauss points |
FE_FILM stores the whole stuff related to a film: the nodal variables, the mesh, etc.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=I4), | public | :: | n_vn | number of nodal variables |
|||
integer(kind=I4), | public | :: | n_vc | number of variables on cells |
|||
type(FE_MESH), | public | :: | m | mesh of the film |
|||
type(DATA_FILM), | public | :: | data_f | data of the problem |
|||
type(PRC_TAB), | public | :: | prc | precomputation |
|||
type(NUM_PAR), | public | :: | num_p | numerical param for iterative solution |
|||
real(kind=R8), | public, | dimension(:,:), allocatable | :: | vn | nodal variables table |
||
real(kind=R8), | public, | dimension(:,:), allocatable | :: | vc | cell variables table |
||
integer(kind=I4), | public, | dimension(:,:), allocatable | :: | bc | boundary nodes code |
||
character(len=20), | public, | dimension(:), allocatable | :: | vn_name | nodal variable names |
||
character(len=20), | public, | dimension(:), allocatable | :: | vc_name | cell variable names |
procedure, public :: fx | force computation along |
procedure, public :: fy | force computation along |
procedure, public :: fz | force computation along |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FE_FILM), | intent(inout) | :: | fe_f | fluid type |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FE_FILM), | intent(inout) | :: | fe_f | FE film |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FE_FILM), | intent(inout) | :: | fe_f | FE film |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DATA_FILM), | intent(inout) | :: | data_f | data of the film |
||
type(NUM_PAR), | intent(in) | :: | num_p | numerical param for iterative solution |
||
type(FE_FILM), | intent(inout) | :: | fe_f | FE film data type |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(inout) | :: | fe_f | FE film data type |
||
type(MAT_SOLV), | intent(inout) | :: | mat | matrices for solving |
||
real(kind=R8), | intent(in), | dimension(MAX_NNC) | :: | bc | boundary conditions at the corners |
|
logical(kind=I4), | intent(in), | optional | :: | flag_ass | optional flag for assembly |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(inout) | :: | fe_f | FE film data type |
||
real(kind=R8), | intent(in), | dimension(MAX_NNC) | :: | bc | boundary conditions at the corners |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(inout) | :: | fe_f | FE film data type |
||
real(kind=R8), | intent(in), | dimension(MAX_NNC) | :: | bc | boundary conditions at the corners |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(inout) | :: | fe_f | FE_film data type |
||
type(MAT_SOLV), | intent(inout) | :: | mat | matrices for solving |
||
integer(kind=I4), | intent(in) | :: | ass_c | assembly type |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(MAT_SOLV), | intent(inout) | :: | mat | mat_solv type |
||
integer(kind=I4), | intent(in) | :: | num | element number |
||
integer(kind=I4), | intent(in) | :: | nelt | size of elemental matrix |
||
integer(kind=I4), | intent(in) | :: | nline | number of lines |
||
integer(kind=I4), | intent(in), | dimension(nelt) | :: | tind | index table of elemental matrix |
|
real(kind=R8), | intent(in), | dimension(nelt, nelt) | :: | m_elt | elemental matrix |
|
integer(kind=I4), | intent(inout), | dimension(2) | :: | compt | number to index the position in the solver matrix |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(inout) | :: | fe_f | FE film |
||
real(kind=R8), | intent(out), | dimension(MAX_NNE, MAX_NNE) | :: | ke_ij | elementary matrix |
|
real(kind=R8), | intent(out), | dimension(MAX_NNE) | :: | be_i | elementary rhs member |
|
integer(kind=I4), | intent(out), | dimension(MAX_NNE) | :: | ind_e | elementary index member |
|
integer(kind=I4), | intent(in) | :: | e | element number |
||
integer(kind=I4), | intent(in) | :: | ass_c | assembly type |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(inout) | :: | fe_f | FE film |
||
type(MAT_SOLV), | intent(inout) | :: | mat | solver type matrices |
||
real(kind=R8), | intent(out), | dimension(MAX_NNC, MAX_NNC) | :: | ke_ij | elementary matrix |
|
real(kind=R8), | intent(inout), | dimension(MAX_NNC ) | :: | be_i | elementary rhs member |
|
integer(kind=I4), | intent(out), | dimension(MAX_NNC ) | :: | ind_e | elementary index member |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(inout) | :: | fe_f | FE film |
||
integer(kind=I4), | intent(in) | :: | e | element number |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in) | :: | spdx | fluid velocity along axis |
||
real(kind=R8), | intent(in) | :: | spdy | fluid velocity along axis |
||
real(kind=R8), | intent(in), | dimension(4) | :: | x | corner abscissae |
|
real(kind=R8), | intent(in), | dimension(4) | :: | y | corner ordinates |
|
real(kind=R8), | intent(out) | :: | length | fluid element length |
||
real(kind=R8), | intent(out) | :: | width | fluid element width |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(inout) | :: | fe_f | FE film |
||
type(MAT_SOLV), | intent(inout) | :: | mat | solver type matrices |
||
real(kind=R8), | intent(out), | dimension(MAX_NNC) | :: | bf | table of fluxes at the corner |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FE_FILM), | intent(in) | :: | fe_f | |||
character(len=*), | intent(in) | :: | file_name | |||
integer(kind=I4), | intent(in) | :: | code | |||
logical(kind=I4), | intent(in) | :: | nodal | if false : cell value, if true : nodal value |