API Reference
TrixiAero.AnalysisCallback — Type
AnalysisCallback(semi; interval=0,
save_analysis=false,
output_directory="out",
analysis_filename="analysis.dat",
extra_analysis_errors=Symbol[],
extra_analysis_integrals=(),
analysis_pointwise=())Analyze a numerical solution every interval time steps and print the results to the screen. If save_analysis, the results are also saved in joinpath(output_directory, analysis_filename).
Additional errors can be computed, e.g. by passing extra_analysis_errors = (:l2_error_primitive, :linf_error_primitive) or extra_analysis_errors = (:conservation_error,).
If you want to omit the computation (to safe compute-time) of the default_analysis_errors, specify analysis_errors = Symbol[]. Note: default_analysis_errors are :l2_error and :linf_error for all equations. If you want to compute extra_analysis_errors such as :conservation_error solely, i.e., without :l2_error, :linf_error you need to specify analysis_errors = [:conservation_error] instead of extra_analysis_errors = [:conservation_error].
Further scalar functions func in extra_analysis_integrals are applied to the numerical solution and integrated over the computational domain. Some examples for this are entropy, energy_kinetic, energy_internal, and energy_total. You can also write your own function with the same signature as the examples listed above and pass it via extra_analysis_integrals. The default analysis_integrals is (entropy_timederivative,). You can also request extra_analysis_integrals such as LiftCoefficientPressure or DragCoefficientPressure by constructing an AnalysisSurfaceIntegral with one of the previously mentioned functions.
Similarly, pointwise, i.e., per quadrature/interpolation point, quantities such at SurfacePressureCoefficient or SurfaceFrictionCoefficient can be computed. Instances of these need to be passed into AnalysisSurfacePointwise which is then in turn passed to analysis_pointwise.
See the developer comments about Trixi.analyze, Trixi.pretty_form_utf, and Trixi.pretty_form_ascii for further information on how to create custom analysis quantities.
In addition, the analysis callback records and outputs a number of quantities that are useful for evaluating the computational performance, such as the total runtime, the performance index (time/DOF/rhs!), the time spent in garbage collection (GC), or the current memory usage (alloc'd memory).
TrixiAero.AnalysisSurfacePointwise — Type
AnalysisSurfacePointwise{Variable, NBoundaries}(boundary_symbol_or_boundary_symbols,
variable, output_directory = "out")This struct is used to compute pointwise surface values of a quantity of interest variable alongside the boundary/boundaries associated with particular names given in boundary_symbols. For instance, this can be used to compute the surface pressure coefficient SurfacePressureCoefficient or surface friction coefficient SurfaceFrictionCoefficient of e.g. an 2D airfoil with the boundary names :AirfoilTop, :AirfoilBottom which would be supplied as boundary_symbols = (:AirfoilTop, :AirfoilBottom). A single boundary name can also be supplied, e.g. boundary_symbols = (:AirfoilTop,).
boundary_symbols::NTuple{NBoundaries, Symbol}: Name(s) of the boundary/boundaries where the quantity of interest is computedvariable::Variable: Quantity of interest, like lift or dragoutput_directory = "out": Directory where the pointwise value files are stored.
TrixiAero.SurfaceFrictionCoefficient — Method
SurfaceFrictionCoefficient(rhoinf, uinf)
Compute the surface skin friction coefficient
\[C_f \coloneqq \frac{\boldsymbol \tau_w \boldsymbol n^\perp} {0.5 \rho_{\infty} U_{\infty}^2 L_{\infty}}\]
based on the wall shear stress vector $\tau_w$ along a boundary. Supposed to be used in conjunction with AnalysisSurfacePointwise which stores the boundary information and semidiscretization.
rho_inf::Real: Free-stream densityu_inf::Real: Free-stream velocity
TrixiAero.SurfacePressureCoefficient — Method
SurfacePressureCoefficient(p_inf, rho_inf, u_inf)Compute the surface pressure coefficient
\[C_p \coloneqq \frac{p - p_{\infty}} {0.5 \rho_{\infty} U_{\infty}^2}\]
based on the pressure distribution along a boundary. Supposed to be used in conjunction with AnalysisSurfacePointwise which stores the boundary information and semidiscretization.
p_inf::Real: Free-stream pressurerho_inf::Real: Free-stream densityu_inf::Real: Free-stream velocity
TrixiAero.examples_dir — Method
examples_dir()Return the directory where the example files provided with TrixiAero.jl are located. If TrixiAero.jl is installed as a regular package (with ]add TrixiAero), these files are read-only and should not be modified. To find out which files are available, use, e.g., readdir:
Examples
readdir(examples_dir())