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

Data Types

type  design_t
 The topology type, which is used to describe the designs in topology optimization. More...
 

Functions/Subroutines

subroutine init_design (this, json, case)
 Initialize the topology.
 
subroutine free_design (this)
 Free the topology.
 
subroutine update_design (this, t, tstep)
 Update the topology.
 
subroutine, public topopt_permeability_force (f, t)
 Compute the permeability force term.
 
subroutine update_permeability (this, t, tstep)
 Update the permeability.
 

Variables

real(kind=rp), dimension(:), allocatable resistance
 The resistance array.
 
type(c_ptrresistance_d = c_null_ptr
 Pointer to the resistance array on the device.
 
integer, dimension(:), pointer design_domain_mask
 Pointer to the design domain mask.
 
type(c_ptrdesign_domain_mask_d = c_null_ptr
 Pointer to the design domain mask on the device.
 

Function/Subroutine Documentation

◆ free_design()

subroutine design_module::free_design ( class(design_t), intent(inout this)
private

Definition at line 207 of file design.f90.

◆ init_design()

subroutine design_module::init_design ( class(design_t), intent(inout this,
type(json_file), intent(inout json,
class(case_t), intent(inout), target  case 
)
Parameters
[in,out]thisThe topology
[in]neko_caseThe neko case
[in]resolutionThe resolution of the topology

Definition at line 109 of file design.f90.

Here is the call graph for this function:

◆ topopt_permeability_force()

subroutine, public design_module::topopt_permeability_force ( class(fluid_user_source_term_t), intent(inout f,
real(kind=rp), intent(in t 
)

This function computes the permeability force term. This is done by computing the permeability at each point in the domain and then multiplying it by the velocity at that point. This is then added to the force term.

Parameters
[in,out]fThe force term
[in]tThe current time

Definition at line 266 of file design.f90.

Here is the caller graph for this function:

◆ update_design()

subroutine design_module::update_design ( class(design_t), intent(inout this,
real(kind=rp), intent(in t,
integer, intent(in tstep 
)
private
Todo:
This is currently just a dummy function. We need to implement the actual topology optimization algorithm here.

Definition at line 224 of file design.f90.

Here is the call graph for this function:

◆ update_permeability()

subroutine design_module::update_permeability ( class(design_t), intent(inout this,
real(kind=rp), intent(in t,
integer, intent(in tstep 
)
private

This function updates the permeability based on the current design. This is done by interpolating the design and updating the pointwise permeability force.

From Andreasen et al. (2008) we have that the permeability is given by

\[ \kappa = \kappa_{0} + (\kappa_{1} - \kappa_{0})\phi(\mathbf{x}) \frac{\beta + 1}{\beta + \phi(\mathbf{x})}, \]

where \(\kappa_{0}\) and \(\kappa_{1}\) are the permeability at solid and fluid, respectively, \(\phi(\mathbf{x})\) is the design variable at point \(\mathbf{x}\), and \(\beta\) is a penalty parameter.

Parameters
[in]neko_caseThe neko case

Definition at line 316 of file design.f90.

Variable Documentation

◆ design_domain_mask

integer, dimension(:), pointer design_module::design_domain_mask
private

Definition at line 49 of file design.f90.

◆ design_domain_mask_d

type(c_ptr) design_module::design_domain_mask_d = c_null_ptr
private

Definition at line 51 of file design.f90.

◆ resistance

real(kind=rp), dimension(:), allocatable design_module::resistance
private

Definition at line 45 of file design.f90.

◆ resistance_d

type(c_ptr) design_module::resistance_d = c_null_ptr
private

Definition at line 47 of file design.f90.