Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
user Module Reference

User defined user region.

Functions/Subroutines

subroutine user_setup (usr)
 Register user defined functions (see nekos user_intf.f90)
 
subroutine user_simcomp (params)
 
subroutine adjoint_forcing (f, t)
 Forcing.
 
subroutine user_calc_quantities (t, tstep, u, v, w, p, coef, params)
 
real(kind=rp) function leak (brink, u, v, w, b, n)
 
subroutine user_ic (u, v, w, p, params)
 
subroutine set_material_properties (t, tstep, rho, mu, cp, lambda, params)
 Read the material properties from the JSON file.
 
subroutine cylinder_ic (u, v, w, p, params)
 Set the initial condition.
 
subroutine heat_source (rhs, t)
 Heat source.
 
subroutine initial_condition (s, params)
 Set the initial condition for the scalar field.
 
subroutine fluid_permeability (f, t)
 Forcing.
 
real function math_ran_dst (ix, iy, iz, ieg, xl, fcoeff)
 Give random distribution depending on position.
 

Variables

type(field_t) divergence
 
real(kind=rp), dimension(:), allocatable resistance
 
type(c_ptrresistance_d = c_null_ptr
 
logical is_initialized = .false.
 
real(kind=rp) pe
 
real(kind=rp) target_temperature
 
real(kind=rp) ramp_time_end = 0.0_rp
 
real(kind=rp) perm = 0.0_rp
 

Function/Subroutine Documentation

◆ adjoint_forcing()

subroutine user::adjoint_forcing ( class(fluid_user_source_term_t), intent(inout f,
real(kind=rp), intent(in t 
)

Definition at line 41 of file user.f90.

Here is the caller graph for this function:

◆ cylinder_ic()

subroutine user::cylinder_ic ( type(field_t), intent(inout u,
type(field_t), intent(inout v,
type(field_t), intent(inout w,
type(field_t), intent(inout p,
type(json_file), intent(inout params 
)

Set the initial condition for the velocity and pressure fields. The conditions is set to 1 everywhere and 0 in the cylinder. Additionally we wish to add some noise to the initial condition.

Parameters
uvelocity field
vvelocity field
wvelocity field
ppressure field
paramsJSON file

Definition at line 50 of file user_setup.f90.

◆ fluid_permeability()

subroutine user::fluid_permeability ( class(fluid_user_source_term_t), intent(inout f,
real(kind=rp), intent(in t 
)

Definition at line 76 of file permeability_user.f90.

◆ heat_source()

subroutine user::heat_source ( class(scalar_user_source_term_t), intent(inout rhs,
real(kind=rp), intent(in t 
)

Definition at line 52 of file heat_source.f90.

Here is the call graph for this function:

◆ initial_condition()

subroutine user::initial_condition ( type(field_t), intent(inout s,
type(json_file), intent(inout params 
)

This function will initialize the scalar field with a two part uniform value. Above z=0 the scalar field will be 0.0 and below z=0 the scalar field will be 1.0.

Parameters
[in,out]sScalar field
[in,out]paramsJSON file

Definition at line 55 of file permeability_user.f90.

◆ leak()

real(kind=rp) function user::leak ( real(kind=rp), dimension(n), intent(in brink,
real(kind=rp), dimension(n), intent(in u,
real(kind=rp), dimension(n), intent(in v,
real(kind=rp), dimension(n), intent(in w,
real(kind=rp), dimension(n), intent(in b,
integer, intent(in n 
)

Definition at line 77 of file cylinder.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ math_ran_dst()

real function user::math_ran_dst ( integer  ix,
integer  iy,
integer  iz,
integer  ieg,
real(kind=rp), dimension(2)  xl,
real(kind=rp), dimension(3)  fcoeff 
)

The original Nek5000 random number generator is implementted in ran1. This totally ad-hoc random number generator below could be preferable to the original one for the simple reason that it gives the same initial cindition independent of the number of processors, which is important for code verification.

Parameters
[in]ix,iy,izGLL point index
[in]iegglobal element number
[in]xlphysical point coordinates
[in]fcoefffunction coefficients
Returns
random distribution

Definition at line 72 of file ext_cyl.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_material_properties()

subroutine user::set_material_properties ( real(kind=rp), intent(in t,
integer, intent(in tstep,
real(kind=rp), intent(inout rho,
real(kind=rp), intent(inout mu,
real(kind=rp), intent(inout cp,
real(kind=rp), intent(inout lambda,
type(json_file), intent(inout params 
)

Definition at line 26 of file user_setup.f90.

◆ user_calc_quantities()

subroutine user::user_calc_quantities ( real(kind=rp), intent(in t,
integer, intent(in tstep,
type(field_t), intent(inout u,
type(field_t), intent(inout v,
type(field_t), intent(inout w,
type(field_t), intent(inout p,
type(coef_t), intent(inout coef,
type(json_file), intent(inout params 
)

Definition at line 30 of file cylinder.f90.

Here is the call graph for this function:

◆ user_ic()

subroutine user::user_ic ( type(field_t), intent(inout u,
type(field_t), intent(inout v,
type(field_t), intent(inout w,
type(field_t), intent(inout p,
type(json_file), intent(inout params 
)

Definition at line 98 of file cylinder.f90.

◆ user_setup()

subroutine user::user_setup ( type(user_t), intent(inout user)

Definition at line 21 of file user.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ user_simcomp()

subroutine user::user_simcomp ( type(json_file), intent(inout params)

Definition at line 27 of file user.f90.

Here is the caller graph for this function:

Variable Documentation

◆ divergence

type(field_t) user::divergence

Definition at line 18 of file cylinder.f90.

◆ is_initialized

logical user::is_initialized = .false.

Definition at line 16 of file heat_source.f90.

◆ pe

real(kind=rp) user::pe

Definition at line 17 of file heat_source.f90.

◆ perm

real(kind=rp) user::perm = 0.0_rp

Definition at line 14 of file permeability_user.f90.

◆ ramp_time_end

real(kind=rp) user::ramp_time_end = 0.0_rp

Definition at line 19 of file heat_source.f90.

◆ resistance

real(kind=rp), dimension(:), allocatable user::resistance

Definition at line 14 of file heat_source.f90.

◆ resistance_d

type(c_ptr) user::resistance_d = c_null_ptr

Definition at line 15 of file heat_source.f90.

◆ target_temperature

real(kind=rp) user::target_temperature

Definition at line 17 of file heat_source.f90.