# Darcy Flow Analysis and Convection Topology Optimization

Forced Convection for Linear Steady-State Heat Transfer is available via Darcy Flow analysis.

Darcy Flow Analysis is currently only supported for steady-state heat transfer analysis. Forced convection applications include cooling solutions for electric motors, machine tools (casting, forming), heat exchangers, HVAC systems, and cooling for electronic devices including PCBs. Additionally, Topology Optimization is available for steady-state heat transfer with Darcy flow analysis. The topology optimization considers the effect of forced convection for cooling in conjunction with structural steady-state heat transfer analysis. Topology optimization can help optimize cooling channel structures and placement for a wide range of applications.

The flow solution is described by:(1) ${K}_{p}p={f}_{p}$
Where,
${K}_{p}$
Permeability matrix
$p$
Nodal pressure in the structure
${f}_{p}$
The fluid flow analysis is solved using Darcy’s Law, which describes the flow of a fluid through a porous medium:(2) $u=-\frac{\kappa }{\mu }\nabla p$
Where,
$u$
Fluid velocity
$\kappa$
Fluid permeability (this is different from thermal conductivity, represented by $k$)
$\mu$
Fluid dynamic viscosity
$\nabla p$
Pressure differential
The equation can be rewritten as:(3) ${u}^{e}=-\frac{\kappa }{\mu }B{p}^{e}$
Where,
${u}^{e}$
Element fluid velocity
$B$
Differential of the shape function
${p}^{e}$
Nodal pressure in the element (which is sourced from the flow solution)
The thermal steady-state heat transfer solution is represented by:(4) $\left[{K}_{c}+C\left(p\right)\right]T=f$
Where,
$K{}_{c}$
Conductivity Matrix: ${K}_{c}=\sum _{n=1}^{{N}_{e}}{\int }_{{\Omega }^{e}}k{B}^{T}Bd\Omega$
$C\left(p\right)$
Convection Matrix (which includes flow velocity ${u}^{e}$ from Darcy's Law): $C\left(p\right)=\sum _{n=1}^{{N}_{e}}{\int }_{{\Omega }^{e}}{\stackrel{^}{N}}^{T}\rho {c}_{p}{u}^{e}Bd\Omega$
Where,
$f$
$T$
Nodal temperature matrix
${\stackrel{^}{N}}^{T}$
Enhanced shape function
${N}_{e}$
Total number of elements
$\rho$
Density
$k$
Thermal conductivity (this is different from fluid permeability, Kappa, represented by $\kappa$)
${c}_{p}$
Specific heat capacity
${u}^{e}$
Element flow velocity from Darcy’s Law

The thermal steady-state solution incorporates forced convection via the Convection Matrix. A topology design space can be defined for a steady-state heat transfer subcase to run the optimization solution which accounts for the forced convection via Darcy flow.

## Input

To turn on forced convection flow analysis, for a Steady-State Heat Transfer Analysis subcase, input definition is required for both the thermal structural and flow analysis.

### Boundary Conditions

Boundary conditions are required for both thermal structural and fluid flow analysis. The typical structural thermal boundary conditions are available via the SPC Subcase/Bulk Data. For flow analysis, there are two options to define the boundary conditions:
Nodal Pressure
Flow analysis is solved in the same subcase as thermal analysis. The SPCP Subcase Entry and SPCP Bulk Data are available to define flow pressure boundary conditions. Both inlet and outlet flow pressures can be defined using the SPCP entry.
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
SPCP SID G D G D G D
Inlet Velocity
Inlet velocity via the INLTVEL Subcase Entry and INLTVEL Bulk Data are alternately available instead of inlet pressure definition via SPCP entries. The outlet pressure still has to be defined using the SPCP entry.
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
INLTVEL SID EID VALUE G1 G2 G3 G4

For Darcy flow analysis, using an SPCP Bulk Data/Subcase Entry pair is mandatory to define the outlet flow pressure. However, for inlet velocity, either the INLTVEL Bulk Data/Subcase pair or the SPCP Bulk/Subcase pair can be used. Therefore, the SPCP Subcase Entry can be considered as an entry which turns on flow analysis for a steady-state heat transfer subcase.

Loading can be applied to either the solid or fluid domain via the typical heat transfer loads. For instance, the SPC entry can be used to define grid temperature loads, the QBDY1 entry can be used to define heat flux loads, and the QVOL entry can be used to define volumetric heat generation loading.

### Material Properties

Material Properties for both structure and fluid for forced convection heat transfer analysis can be defined via the MAT4 Bulk Data entry. The structural material properties are typically defined using the first line which specify the fields, K (structural conductivity), CP (structural specific heat), RHO (structural density), and H (convection heat transfer coefficient). H is only used for free convection to ambient in the presence of CONV Bulk Data. For the fluid heat transfer properties, the DARCY continuation line can be used to define KAPPA (fluid permeability), MU (fluid dynamic viscosity), K (fluid conductivity), CP (fluid specific heat), and RHO (fluid density).
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
MAT4 MID K CP RHO H   HGEN
DARCY KAPPA MU K CP RHO

If certain elements are supposed to only be solid elements, then the DARCY continuation line is not required. For elements which reference materials without a DARCY continuation line, then the lowest KAPPA/MU value from all the fluid MAT4 entries is taken and multiplied with 10-9 and this value is used for solid permeability calculations for Darcy flow analysis.

When only Darcy flow analysis is run, without optimization, then each element can reference either a solid-only MAT4 entry (without DARCY continuation line), or a fluid-only MAT4 entry (with DARCY continuation line, but no structural thermal properties).

However, when topology optimization is run, then for elements in the design space, the referenced MAT4 entry should contain both structural and fluid material properties.

### Topology Optimization

During topology optimization, each element in the design space can either be a solid (density=1) or a void (fluid, density=0). Therefore, elements in the design space should reference MAT4 entries with both structural and fluid material properties.

For forced convection topology both DOPTPRM,TOPDISC,YES and minimum member size control (either using DOPTPRM,MINDIM or using MEMBSIZ on the DTPL entry) are turned on automatically. If minimum member size control is not turned on by you, then it is automatically activated with a value based on the average mesh size.

The following responses are available for Flow-based Forced Convection Topology Optimization:
1. Global Thermal Compliance (RTYPE=TCOMP)(5) ${T}_{c}=\frac{1}{2}{t}^{T}{f}_{t}=\frac{1}{2}{t}^{T}\left[{K}_{t}+C\left(p\right)\right]t$
2. Grid Temperature (RTYPE=TEMP)
3. Nodal Flow Pressure (RTYPE=FLOWPRES)

An example application is that the nodal flow pressure response can be used to constrain the overall pressure drop across the inlet and the outlet at a given inlet velocity. Thereby, the pressure drop for a fluid pump that is used to pump fluid through the structure is constrained. Another way to inherently define the pressure drop value is also to use SPCP Bulk Data to define both the inlet and outlet pressures.

### Supported Input

Darcy flow analysis and Convection Topology Optimization is supported for shell and solid elements. The DTPL Bulk Data Entry can be used to turn on Topology Optimization.

### Sample Model Setup

The following sample illustrates an example model setup.
$*****************************************************************$ DARCY FLOW ANALYSIS – FORCED CONVECTION STEADY STATE HEAT TRANFER
$***************************************************************** SUBCASE 1 SPC = 4$ Provides Heat transfer boundary conditions or Temperature loading.
SPCP = 6 	$Activates Darcy Flow analysis, while providing outlet pressure INLTVEL = 2$ This is not mandatory. SPCP can also be used to define inlet pressure
LOAD = 13 	$Defines Heat Transfer loading via either QBDY1 or QVOL. PRESSURE = ALL$ Turns on nodal pressure output for Darcy flow.
VELOCITY = ALL $Elemental Velocity is output by default for Darcy flow. BEGIN BULK$--1---><--2---><--3---><--4---><--5---><--6---><--7---><--8---><--9---><--10-->
QBDY1         13  10000.   10501
MAT4           1 50.2    5.02E8 7.83E-9 1.2765
MAT4           2 50.2    5.02E8 7.83E-9 1.2765
+        DARCY    0.1    1000.0 0.598   4.183E+9 1.0E-9
INLTVEL        2    9305  1000.0    8605     425  1549  8611
INLTVEL        2   13305  1000.0   12826    8605  8611  12832
INLTVEL        2   17305  1000.0   17047   12826 12832  17053
INLTVEL        2   21305  1000.0   21268   17047 17053  21274
SPC            4     425            0.0
SPC            4     426            0.0
SPCP           6  122612     0.0
SPCP           6  118391     0.0

## Output

Generally, any output from Steady-State Heat Transfer analysis, like Grid Temperatures (THERMAL) and Heat Flux (FLUX) are supported for Darcy flow analysis.

In addition, Nodal Flow Pressure (PRESSURE) and Elemental Velocity (VELOCITY) output are available specifically for Darcy flow analysis.

Nodal pressure is a scalar quantity output that is off by default. PRESSURE I/O Entry can be used to turn on the nodal pressure output.

Elemental velocity is a vector output by default, and can be controlled using the VELOCITY I/O Entry.(6) $u=-\frac{\kappa }{\mu }\nabla p=-\frac{\kappa }{\mu }B{p}^{e}$
Where,
$u$
Elemental velocity
$\kappa$
Fluid permeability
$\mu$
Fluid dynamic viscosity
$\nabla p$
Pressure differential
$B$
Differential of the elemental shape function
${p}^{e}$
Nodal pressures in element $e$
The following table illustrates the input and output entries required to run the solution.
Table 1. Darcy Flow Analysis and Convection Topology Optimization Overview
Darcy Flow Analysis and Convection Topology Bulk Data Case Control
Fixed Temperature Boundary Conditions SPC SPC
Fluid Boundary Conditions SPCP, INLTVEL SPCP, INLTVEL
Structural Thermal Material
Fluid Thermal Material MAT4 (DARCY continuation line)