Skip to content

Adjoint design optimization of 3D pipe bend #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
222 changes: 222 additions & 0 deletions design/Inc_Turbulent_Bend_Wallfunctions/config.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% SU2 configuration file %
% Case description: turbulent 90 degree bend flow of Sudo (2001) %
% Reynolds = 1.185*8.7*0.104/1.785e-5 ~ 60,000 %
% Author: Nijso Beishuizen %
% Date: 2024.01.13 %
% File Version 8.0.0 "Harrier" %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------%
%
SOLVER= INC_RANS
INC_NONDIM= DIMENSIONAL
KIND_TURB_MODEL= SST
SST_OPTIONS= V2003m

% switch to RESTART_SOL= YES if you do not have an initial solution
% RESTART_SOL= YES
RESTART_SOL= YES
%
% ITER= 4000
ITER= 100

%
OBJECTIVE_FUNCTION= __OBJ_FUNC__
OBJECTIVE_WEIGHT= 1.0
%
% ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------%
%
INC_DENSITY_INIT= 1.185
INC_DENSITY_REF = 1.185
INC_VELOCITY_INIT= ( 0.0, 0.0, 1.0 )
INC_VELOCITY_REF = 8.0
INC_INLET_TYPE= VELOCITY_INLET
INC_OUTLET_TYPE= PRESSURE_OUTLET
%
% --------------------------- VISCOSITY MODEL ---------------------------------%
%
VISCOSITY_MODEL= CONSTANT_VISCOSITY
MU_CONSTANT= 1.785e-5
%
% -------------------- BOUNDARY CONDITION DEFINITION --------------------------%
%

% ------------------------------- %
SPECIFIED_INLET_PROFILE= YES
INLET_FILENAME= inlet.dat
% ------------------------------- %

%MARKER_HEATFLUX= ( wall_1, 0.0, wall_2,0.0, wall_bend,0.0)
MARKER_HEATFLUX= ( wall,0.0)
MARKER_INLET= ( inlet, 300.0, 8.7, 0.0, 0.0, 1.0 )
MARKER_OUTLET= ( outlet, 0.0)
MARKER_SYM= ( symmetry )
%
MARKER_MONITORING= ( outlet, inlet )
MARKER_PLOTTING= ( wall, symmetry )
% # for pressure drop we need outlet and inlet
MARKER_ANALYZE= ( outlet, inlet )
MARKER_ANALYZE_AVERAGE= MASSFLUX
%
% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------%
%
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
%__DIRECT__CFL_NUMBER= 300
%__ADJOINT__CFL_NUMBER=200

CFL_ADAPT= NO

%
% ------------------------ LINEAR SOLVER DEFINITION ---------------------------%
%
LINEAR_SOLVER= FGMRES
LINEAR_SOLVER_PREC= ILU
LINEAR_SOLVER_ERROR= 1E-06
%__DIRECT__LINEAR_SOLVER_ITER= 5
%__ADJOINT__LINEAR_SOLVER_ITER= 10

%
% -------------------------- MULTIGRID PARAMETERS -----------------------------%
%
MGLEVEL= 0
%
% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------%
%
CONV_NUM_METHOD_FLOW= FDS
MUSCL_FLOW= YES
SLOPE_LIMITER_FLOW= NONE
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
%
CONV_NUM_METHOD_TURB= SCALAR_UPWIND
MUSCL_TURB= NO
%SLOPE_LIMITER_TURB= VENKATAKRISHNAN
TIME_DISCRE_TURB= EULER_IMPLICIT
FREESTREAM_TURBULENCEINTENSITY= 0.10
FREESTREAM_TURB2LAMVISCRATIO= 100.0
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
%
%__ADJOINT__CONV_FIELD= RMS_ADJ_PRESSURE
%__DIRECT__CONV_FIELD= RMS_PRESSURE
CONV_RESIDUAL_MINVAL= -12
CONV_STARTITER= 10
CONV_CAUCHY_ELEMS= 100
CONV_CAUCHY_EPS= 1E-6
%
% ------------------------- INPUT/OUTPUT INFORMATION --------------------------%
%
MESH_FILENAME= sudo_coarse_FFD.su2
SOLUTION_FILENAME= solution
CONV_FILENAME= history
RESTART_FILENAME= restart
WRT_RESTART_OVERWRITE= YES
WRT_VOLUME_OVERWRITE= YES
WRT_SURFACE_OVERWRITE= YES
WRT_PERFORMANCE= YES
VOLUME_FILENAME= flow
OUTPUT_WRT_FREQ= 100
SCREEN_WRT_FREQ_INNER= 1
SCREEN_WRT_FREQ_OUTER= 1
% Note that this goes together with RESTART_ASCII
READ_BINARY_RESTART= NO
%
OUTPUT_FILES= PARAVIEW_MULTIBLOCK RESTART_ASCII
GRAD_OBJFUNC_FILENAME= of_grad.csv
%__DIRECT__SCREEN_OUTPUT= INNER_ITER WALL_TIME RMS_PRESSURE RMS_VELOCITY-X RMS_VELOCITY-Y RMS_TKE RMS_DISSIPATION LINSOL_ITER LINSOL_RESIDUAL LINSOL_ITER_TURB LINSOL_RESIDUAL_TURB
%__ADJOINT__SCREEN_OUTPUT= INNER_ITER WALL_TIME RMS_ADJ_PRESSURE RMS_ADJ_VELOCITY-X RMS_ADJ_VELOCITY-Y RMS_ADJ_TKE RMS_ADJ_DISSIPATION

% !!! Note that this determines the output of the objectives !!!
HISTORY_OUTPUT= INNER_ITER RMS_RES FLOW_COEFF FLOW_COEFF_SURF

OUTPUT_PRECISION= 16

WRT_RESTART_COMPACT = YES

MESH_OUT_FILENAME= mesh_out
%
% -------------------- FREE-FORM DEFORMATION PARAMETERS -----------------------%
%
% Tolerance of the Free-Form Deformation point inversion
FFD_TOLERANCE= 1E-10
%
% Maximum number of iterations in the Free-Form Deformation point inversion
FFD_ITERATIONS= 500
%
% FFD box definition: 3D case (FFD_BoxTag, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4,
% X5, Y5, Z5, X6, Y6, Z6, X7, Y7, Z7, X8, Y8, Z8)
% 2D case (FFD_BoxTag, X1, Y1, 0.0, X2, Y2, 0.0, X3, Y3, 0.0, X4, Y4, 0.0,
% 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
% Start at the lowest leftest corner and turn counter-clockwise
%FFD_DEFINITION= (BOX, \
%-0.06, 0.000, 0.26, \
% 0.20, 0.000, 0.26 \
% 0.20, 0.055, 0.26, \
%-0.06, 0.055, 0.26, \
%-0.06, 0.000 ,0.00, \
% 0.20 ,0.000, 0.00, \
% 0.20, 0.055, 0.00, \
%-0.06, 0.055, 0.00 )
%
% FFD box degree: 3D case (i_degree, j_degree, k_degree)
% 2D case (i_degree, j_degree, 0)
% fixes the nodes on the surface plane that cross the domain
FFD_CONTINUITY= 1ST_DERIVATIVE

%
% # DV_KIND= FFD_SETTING
% # 6 x 6 x 6 = 216 nodes
% # 216 x 3 = 648 d.o.f. for all 3 directions
%
DV_KIND= __FFD_CTRL_PTS__
%
% Marker of the surface in which we are going apply the shape deformation
%
DV_MARKER= ( wall, symmetry)
%
% Parameters of the shape deformation
% - FFD_SETTING ( 1.0 )
% - FFD_CONTROL_POINT ( FFD_BoxTag, i_Ind, j_Ind, k_Ind, x_Disp, y_Disp, z_Disp )
%
DV_PARAM= __FFD_PARAM__
%
% 216 x 3 = 648 points
%
DV_VALUE= __FFD_PTS__
%
% ------------------------ GRID DEFORMATION PARAMETERS ------------------------%
%
% Linear solver or smoother for implicit formulations (FGMRES, RESTARTED_FGMRES, BCGSTAB)
DEFORM_LINEAR_SOLVER= FGMRES
%
% Preconditioner of the Krylov linear solver (ILU, LU_SGS, JACOBI)
DEFORM_LINEAR_SOLVER_PREC= ILU
%
% Number of smoothing iterations for mesh deformation
DEFORM_LINEAR_SOLVER_ITER= 1000
%
% Number of nonlinear deformation iterations (surface deformation increments)
DEFORM_NONLINEAR_ITER= 1
%
% Minimum residual criteria for the linear solver convergence of grid deformation
DEFORM_LINEAR_SOLVER_ERROR= 1E-14
%
% Print the residuals during mesh deformation to the console (YES, NO)
DEFORM_CONSOLE_OUTPUT= YES
%
% Deformation coefficient (linear elasticity limits from -1.0 to 0.5, a larger
% value is also possible)
DEFORM_COEFF = 1.0e6
%
% Type of element stiffness imposed for FEA mesh deformation (INVERSE_VOLUME,
% WALL_DISTANCE, CONSTANT_STIFFNESS)
%DEFORM_STIFFNESS_TYPE= WALL_DISTANCE
DEFORM_STIFFNESS_TYPE= CONSTANT_STIFFNESS
%
% Deform the grid only close to the surface. It is possible to specify how much
% of the volumetric grid is going to be deformed in meters or inches (1E6 by default)
DEFORM_LIMIT = 1E6
Loading