Skip to content

Conversation

frx-wintermute
Copy link
Contributor

This pull request is part of plan (B) described in su2code/su2code.github.io#134 (comment)

Auxiliary source files were also included to automate the tutorial
simulations and the visualization of results (with ParaView and LaTeX
PGFPlots).
Those files have been moved back to the SU2 code repository.
Comment on lines 14 to 23
% Physical governing equations (EULER, NAVIER_STOKES,
% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY,
% POISSON_EQUATION)
SOLVER= EULER
%
% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT)
MATH_PROBLEM= CONTINUOUS_ADJOINT
%
% Restart solution (NO, YES)
RESTART_SOL= NO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Physical governing equations (EULER, NAVIER_STOKES,
% WAVE_EQUATION, HEAT_EQUATION, FEM_ELASTICITY,
% POISSON_EQUATION)
SOLVER= EULER
%
% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT)
MATH_PROBLEM= CONTINUOUS_ADJOINT
%
% Restart solution (NO, YES)
RESTART_SOL= NO
SOLVER= EULER
MATH_PROBLEM= CONTINUOUS_ADJOINT
RESTART_SOL= NO

Comment on lines 27 to 37
% Mach number (non-dimensional, based on the free-stream values)
MACH_NUMBER= 0.8
%
% Angle of attack (degrees)
AOA= 1.25
%
% Free-stream pressure (101325.0 N/m^2 by default, only Euler flows)
FREESTREAM_PRESSURE= 101325.0
%
% Free-stream temperature (273.15 K by default)
FREESTREAM_TEMPERATURE= 273.15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Mach number (non-dimensional, based on the free-stream values)
MACH_NUMBER= 0.8
%
% Angle of attack (degrees)
AOA= 1.25
%
% Free-stream pressure (101325.0 N/m^2 by default, only Euler flows)
FREESTREAM_PRESSURE= 101325.0
%
% Free-stream temperature (273.15 K by default)
FREESTREAM_TEMPERATURE= 273.15
MACH_NUMBER= 0.8
AOA= 1.25
FREESTREAM_PRESSURE= 101325.0
FREESTREAM_TEMPERATURE= 273.15

Comment on lines 41 to 62
% Ratio of specific heats (1.4 (air), only for compressible flows)
GAMMA_VALUE= 1.4
%
% Specific gas constant (287.87 J/kg*K (air), only for compressible flows)
GAS_CONSTANT= 287.87

% ---------------------- REFERENCE VALUE DEFINITION ---------------------------%
%
% Reference origin for moment computation
REF_ORIGIN_MOMENT_X = 0.25
REF_ORIGIN_MOMENT_Y = 0.00
REF_ORIGIN_MOMENT_Z = 0.00
%
% Reference length for pitching, rolling, and yawing non-dimensional moment
REF_LENGTH= 1.0
%
% Reference area for force coefficients (0 implies automatic calculation)
REF_AREA= 1.0
%
% Flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE,
% FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE)
REF_DIMENSIONALIZATION= DIMENSIONAL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Ratio of specific heats (1.4 (air), only for compressible flows)
GAMMA_VALUE= 1.4
%
% Specific gas constant (287.87 J/kg*K (air), only for compressible flows)
GAS_CONSTANT= 287.87
% ---------------------- REFERENCE VALUE DEFINITION ---------------------------%
%
% Reference origin for moment computation
REF_ORIGIN_MOMENT_X = 0.25
REF_ORIGIN_MOMENT_Y = 0.00
REF_ORIGIN_MOMENT_Z = 0.00
%
% Reference length for pitching, rolling, and yawing non-dimensional moment
REF_LENGTH= 1.0
%
% Reference area for force coefficients (0 implies automatic calculation)
REF_AREA= 1.0
%
% Flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE,
% FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE)
REF_DIMENSIONALIZATION= DIMENSIONAL
GAMMA_VALUE= 1.4
GAS_CONSTANT= 287.87
% ---------------------- REFERENCE VALUE DEFINITION ---------------------------%
REF_ORIGIN_MOMENT_X = 0.25
REF_ORIGIN_MOMENT_Y = 0.00
REF_ORIGIN_MOMENT_Z = 0.00
REF_LENGTH= 1.0
REF_AREA= 1.0
REF_DIMENSIONALIZATION= DIMENSIONAL

Comment on lines 66 to 81
% Marker of the Euler boundary (NONE = no marker)
MARKER_EULER= ( airfoil )
%
% Marker of the far field (NONE = no marker)
MARKER_FAR= ( farfield )

% ------------------------ SURFACES IDENTIFICATION ----------------------------%
%
% Marker(s) of the surface in the surface flow solution file
MARKER_PLOTTING = ( airfoil )
%
% Marker(s) of the surface where the non-dimensional coefficients are evaluated.
MARKER_MONITORING = ( airfoil )
%
% Marker(s) of the surface where obj. func. (design problem) will be evaluated
MARKER_DESIGNING = ( airfoil )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Marker of the Euler boundary (NONE = no marker)
MARKER_EULER= ( airfoil )
%
% Marker of the far field (NONE = no marker)
MARKER_FAR= ( farfield )
% ------------------------ SURFACES IDENTIFICATION ----------------------------%
%
% Marker(s) of the surface in the surface flow solution file
MARKER_PLOTTING = ( airfoil )
%
% Marker(s) of the surface where the non-dimensional coefficients are evaluated.
MARKER_MONITORING = ( airfoil )
%
% Marker(s) of the surface where obj. func. (design problem) will be evaluated
MARKER_DESIGNING = ( airfoil )
MARKER_EULER= ( airfoil )
MARKER_FAR= ( farfield )
% ------------------------ SURFACES IDENTIFICATION ----------------------------%
MARKER_PLOTTING = ( airfoil )
MARKER_MONITORING = ( airfoil )
MARKER_DESIGNING = ( airfoil )

Comment on lines 85 to 105
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
%
% Objective function in optimization problem (DRAG, LIFT, SIDEFORCE, MOMENT_X,
% MOMENT_Y, MOMENT_Z, EFFICIENCY,
% EQUIVALENT_AREA, NEARFIELD_PRESSURE,
% FORCE_X, FORCE_Y, FORCE_Z, THRUST,
% TORQUE, FREE_SURFACE, TOTAL_HEATFLUX,
% MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE,
% INVERSE_DESIGN_HEATFLUX)
OBJECTIVE_FUNCTION= DRAG
%
% Courant-Friedrichs-Lewy condition of the finest grid
CFL_NUMBER= 1e3
%
% Adaptive CFL number (NO, YES)
CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
%
% Objective function in optimization problem (DRAG, LIFT, SIDEFORCE, MOMENT_X,
% MOMENT_Y, MOMENT_Z, EFFICIENCY,
% EQUIVALENT_AREA, NEARFIELD_PRESSURE,
% FORCE_X, FORCE_Y, FORCE_Z, THRUST,
% TORQUE, FREE_SURFACE, TOTAL_HEATFLUX,
% MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE,
% INVERSE_DESIGN_HEATFLUX)
OBJECTIVE_FUNCTION= DRAG
%
% Courant-Friedrichs-Lewy condition of the finest grid
CFL_NUMBER= 1e3
%
% Adaptive CFL number (NO, YES)
CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10 )
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
OBJECTIVE_FUNCTION= DRAG
CFL_NUMBER= 1e3
CFL_ADAPT= NO
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10 )

Comment on lines 85 to 107
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
%
% Objective function in optimization problem (DRAG, LIFT, SIDEFORCE, MOMENT_X,
% MOMENT_Y, MOMENT_Z, EFFICIENCY,
% EQUIVALENT_AREA, NEARFIELD_PRESSURE,
% FORCE_X, FORCE_Y, FORCE_Z, THRUST,
% TORQUE, FREE_SURFACE, TOTAL_HEATFLUX,
% MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE,
% INVERSE_DESIGN_HEATFLUX)
OBJECTIVE_FUNCTION= DRAG
%
% Courant-Friedrichs-Lewy condition of the finest grid
CFL_NUMBER= 1e3
%
% Adaptive CFL number (NO, YES)
CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10 )
%
% Number of total iterations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
%
% Objective function in optimization problem (DRAG, LIFT, SIDEFORCE, MOMENT_X,
% MOMENT_Y, MOMENT_Z, EFFICIENCY,
% EQUIVALENT_AREA, NEARFIELD_PRESSURE,
% FORCE_X, FORCE_Y, FORCE_Z, THRUST,
% TORQUE, FREE_SURFACE, TOTAL_HEATFLUX,
% MAXIMUM_HEATFLUX, INVERSE_DESIGN_PRESSURE,
% INVERSE_DESIGN_HEATFLUX)
OBJECTIVE_FUNCTION= DRAG
%
% Courant-Friedrichs-Lewy condition of the finest grid
CFL_NUMBER= 1e3
%
% Adaptive CFL number (NO, YES)
CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10 )
%
% Number of total iterations
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
OBJECTIVE_FUNCTION= DRAG
CFL_NUMBER= 1e3
CFL_ADAPT= NO
CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10 )

Comment on lines 112 to 121
% Linear solver for implicit formulations (BCGSTAB, FGMRES)
LINEAR_SOLVER= FGMRES
%
% Preconditioner of the Krylov linear solver (JACOBI, LINELET, LU_SGS)
LINEAR_SOLVER_PREC= ILU
%
% Minimum error of the linear solver for implicit formulations
LINEAR_SOLVER_ERROR= 1E-10
%
% Max number of iterations of the linear solver for the implicit formulation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Linear solver for implicit formulations (BCGSTAB, FGMRES)
LINEAR_SOLVER= FGMRES
%
% Preconditioner of the Krylov linear solver (JACOBI, LINELET, LU_SGS)
LINEAR_SOLVER_PREC= ILU
%
% Minimum error of the linear solver for implicit formulations
LINEAR_SOLVER_ERROR= 1E-10
%
% Max number of iterations of the linear solver for the implicit formulation
LINEAR_SOLVER= FGMRES
LINEAR_SOLVER_PREC= ILU
LINEAR_SOLVER_ERROR= 1E-10

Comment on lines 126 to 144
% Multi-Grid Levels (0 = no multi-grid)
MGLEVEL= 3
%
% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE)
MGCYCLE= W_CYCLE
%
% Multi-Grid PreSmoothing Level
MG_PRE_SMOOTH= ( 1, 2, 3, 3 )
%
% Multi-Grid PostSmoothing Level
MG_POST_SMOOTH= ( 0, 0, 0, 0 )
%
% Jacobi implicit smoothing of the correction
MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 )
%
% Damping factor for the residual restriction
MG_DAMP_RESTRICTION= 1.0
%
% Damping factor for the correction prolongation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Multi-Grid Levels (0 = no multi-grid)
MGLEVEL= 3
%
% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE)
MGCYCLE= W_CYCLE
%
% Multi-Grid PreSmoothing Level
MG_PRE_SMOOTH= ( 1, 2, 3, 3 )
%
% Multi-Grid PostSmoothing Level
MG_POST_SMOOTH= ( 0, 0, 0, 0 )
%
% Jacobi implicit smoothing of the correction
MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 )
%
% Damping factor for the residual restriction
MG_DAMP_RESTRICTION= 1.0
%
% Damping factor for the correction prolongation
MGLEVEL= 3
MGCYCLE= W_CYCLE
MG_PRE_SMOOTH= ( 1, 2, 3, 3 )
MG_POST_SMOOTH= ( 0, 0, 0, 0 )
MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 )
MG_DAMP_RESTRICTION= 1.0

Comment on lines 149 to 157
% Convective numerical method
%
CONV_NUM_METHOD_FLOW= JST
%
% 2nd and 4th order artificial dissipation coefficients
JST_SENSOR_COEFF= ( 0.5, 0.02 )
%
% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT)
TIME_DISCRE_FLOW= EULER_IMPLICIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% Convective numerical method
%
CONV_NUM_METHOD_FLOW= JST
%
% 2nd and 4th order artificial dissipation coefficients
JST_SENSOR_COEFF= ( 0.5, 0.02 )
%
% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT)
TIME_DISCRE_FLOW= EULER_IMPLICIT
CONV_NUM_METHOD_FLOW= JST
JST_SENSOR_COEFF= ( 0.5, 0.02 )
TIME_DISCRE_FLOW= EULER_IMPLICIT

Comment on lines 159 to 169
% ---------------- ADJOINT-FLOW NUMERICAL METHOD DEFINITION -------------------%
%
% Convective numerical method (JST, LAX-FRIEDRICH, ROE)
CONV_NUM_METHOD_ADJFLOW= JST
%
% Reduction factor of the CFL coefficient in the adjoint problem
CFL_REDUCTION_ADJFLOW= 0.01
%
% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT)
TIME_DISCRE_ADJFLOW= EULER_IMPLICIT

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
% ---------------- ADJOINT-FLOW NUMERICAL METHOD DEFINITION -------------------%
%
% Convective numerical method (JST, LAX-FRIEDRICH, ROE)
CONV_NUM_METHOD_ADJFLOW= JST
%
% Reduction factor of the CFL coefficient in the adjoint problem
CFL_REDUCTION_ADJFLOW= 0.01
%
% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT)
TIME_DISCRE_ADJFLOW= EULER_IMPLICIT

Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you opened the PR but did not allow commits from maintainers, you'll have to apply the suggestions above yourself unfortunately.

@frx-wintermute
Copy link
Contributor Author

I think you opened the PR but did not allow commits from maintainers, you'll have to apply the suggestions above yourself unfortunately.

Yes, I confirm that I opened the pull request without allowing commits from maintainers: the rationale is that I would like to understand and check any change you possibly ask me to apply, as in this very case.

If I am not mistaken, you are asking me to strip out all the comments from the two configuration files. Why so?

Other tutorials seem to have configuration files with comments. For instance: https://github.com/su2code/Tutorials/blob/develop/incompressible_flow/Inc_Laminar_Flat_Plate/lam_flatplate.cfg

Please explain the reason behind your requested changes and I will be more than happy to apply them!

@pcarruscag
Copy link
Member

The lists of possible options in those comments have become obsolete, we want to document options in a single place (config_template) and only note what is important for particular cases.

@pcarruscag
Copy link
Member

For example these 2 configs are copy pasted from the quick start and only a couple lines are different.

@pcarruscag
Copy link
Member

And since they are not used for any test I would even say it would be more valuable to simply instruct what few options need to change in the tutorial, and avoid adding these files which will become outdated (note that I did ask for those tests)

@frx-wintermute
Copy link
Contributor Author

The lists of possible options in those comments have become obsolete, we want to document options in a single place (config_template) and only note what is important for particular cases.

I have stripped out all the comments from the two config files.

Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@pcarruscag pcarruscag merged commit 25d54da into su2code:develop Jul 21, 2023
@frx-wintermute frx-wintermute deleted the add_quickstart_tutorial branch July 21, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants