Outputs

The output tuple contains many items. The post_process function docstring lists them. The purpose of showing this function here is not for you to manually run the fuction, but simply rather for you to see what the available outputs are.

DuctAPE.post_processFunction
post_process(
    solver_options,
    converged_states,
    prepost_containers,
    solve_container_caching,
    solve_parameter_cache_vector,
    solve_parameter_cache_dims,
    operating_point,
    reference_parameters,
    boundary_layer_options,
    A_bb_LU,
    idmaps,
    problem_dimensions,
    multipoint_index;
    write_outputs=options.write_outputs,
    outfile=options.outfile,
    checkoutfileexists=options.checkoutfileexists,
    output_tuple_name=options.output_tuple_name,
    verbose=options.verbose,
)

Post-process a converged nonlinear solve solution.

Arguments

  • solver_options::SolverOptionsType : A SolverOptionsType object (also used for dispatch)
  • converged_states::Vector{Float} : the converged state variables
  • prepost_containers::NamedTuple : the named tuple containing pre-allocated containers for the pre- and post-processing intermediate calculations
  • solve_container_cache::NamedTuple : the cache and dimensions for intermediate values in the residual calculation
  • solve_parameter_cache_vector::Vector{Float} : the applicably typed cache vector for the solve parameters
  • solve_parameter_cache_dims::NamedTuple : the dimensions of the solver parameters
  • operating_point::OperatingPoint : the operating point being analyzed
  • reference_parameters::ReferenceParameters : a ReferenceParameters object
  • BoundaryLayerOptions::BoundaryLayerOptions : a BoundaryLayerOptions object
  • A_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix
  • airfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements
  • idmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process
  • problem_dimensions::ProblemDimensions : A ProblemDimensions object

Keyword Arguments

  • multipoint_index::Vector{Int} : a one-dimensional vector containing the index of which multipoint analysis operating point is being analyzed.
  • write_outputs=options.write_outputs::Vector{Bool} : a vector with the same length as number of multipoints indicating if the outputs should be saved.
  • outfile=options.outfile::Vector{String} : a vector of file paths/names for where outputs should be written
  • checkoutfileexists=options.checkoutfileexists::Bool : a flag for whether existing files should be checked for or if blind overwriting is okay.
  • output_tuple_name=options.output_tuple_name::Vector{String} : the variable name(s) of the named tuple of outputs to be written.
  • verbose::Bool=false : flag to print verbose statements

Returns

outs::NamedTuple : A named tuple containing all the output values including

Extended help

Full Outputs Information: Each for any level of these outputs with sub-levels, the higher level is a NamedTuple comprised of the of items listed below it. For example: outs.bodies.boundary_layers.stagnation_indices

  • bodies::NamedTuple : NamedTuple containing outputs related to the duct and center body
    • panel_strengths::Vector{Float} : body vortex panel strengths
    • inviscid_thrust::Vector{Float} : dimensional force in positive axial direction for duct and center body.
    • body_force_coefficient::Vector{Float} : force coefficients associated with dimensional inviscid thrust components
    • viscous_drag::Vector{Float} : dimensional force in negative axial direction for duct and center body (note: zero if boundary layer is turned off, and center body is always zero since no drag method is yet implemented for the center body)
    • thrust_comp::Vector{Float} : inviscid_thrust .- viscous_drag
    • total_thrust::Float : sum(thrust_comp)
    • induced_efficiency::Vector{Float} : body-induced propulsive efficiency
    • cp_in::Vector{Float} : inside pressure distribution for all bodies
    • cp_out::Vector{Float} : inside pressure distribution for all bodies
    • cp_casing_in::Vector{Float} : inside pressure distribution for duct casing
    • cp_casing_out::Vector{Float} : outside pressure distribution for duct casing
    • casing_zpts::Vector{Float} : axial component of casing control points
    • cp_nacelle_in::Vector{Float} : inside pressure distribution for duct nacelle
    • cp_nacelle_out::Vector{Float} : inside pressure distribution for duct nacelle
    • nacelle_zpts::Vector{Float} : axial component of nacelle control points
    • cp_center_body_in::Vector{Float} : inside pressure distribution for center bodies
    • cp_center_body_out::Vector{Float} : inside pressure distribution for center bodies
    • center_body_zpts::Vector{Float} : axial components of center body control points
    • Vtot_in::Matrix{Float} : total inner surface velocity distribution for all bodies. row 1 is vz, row 2 is vr, columns are control points.
    • Vtot_out::Matrix{Float} : total outer surface velocity distribution for all bodies. row 1 is vz, row 2 is vr, columns are control points.
    • Vtot_prejump::Matrix{Float} : total surface velocity distribution before velocity jumps terms are applied for all bodies. row 1 is vz, row 2 is vr, columns are control points.
    • vtot_body::Vector{Float} : body-induced velocity on the body surfaces
    • vtot_jump::Vector{Float} : velocity due to jump terms in Fredholm equation
    • vtot_wake::Vector{Float} : wake-induced velocity on the body surfaces
    • vtot_rotors::Vector{Float} : rotor-induced velocity on the body surfaces
    • Vtan_in::Vector{Float} : inner surface tangential velocity distribution for all bodies
    • Vtan_out::Vector{Float} : outer surface tangential velocity distribution for all bodies
    • vtan_casing_in::Vector{Float} : inner surface tangential velocity distribution for duct casing
    • vtan_casing_out::Vector{Float} : outer surface tangential velocity distribution for duct casing
    • vtan_nacelle_in::Vector{Float} : inner surface tangential velocity distribution for duct nacelle
    • vtan_nacelle_out::Vector{Float} : outer surface tangential velocity distribution for duct nacelle
    • vtan_center_body_in::Vector{Float} : inner surface tangential velocity distribution for center body
    • vtan_center_body_out::Vector{Float} : outer surface tangential velocity distribution for center bodies
    • boundary_layers::NamedTuple : NamedTuple containing information from the boundary layer solve (if model_drag in boundary_layer_options was set to true).
      • stagnation_indices::Vector{Int} : indices surrounding stagnation point
      • upper_initial_states::Vector{Float} : upper side initial states
      • upper_solved_states::Matrix{Float} : upper side solved states
      • upper_solved_steps::Vector{Float} : final steps associated with upper side solved states
      • lower_initial_states::Vector{Float} : lower side initial states
      • lower_solved_states::Matrix{Float} : lower side solved states
      • lower_solved_steps::Vector{Float} : final steps associated with lower side solved states
      • surface_length_upper::Vector{Float} : cumulative panel lengths on upper side
      • surface_length_lower::Vector{Float} : cumulative panel lengths on lower side
      • stag_point::Float : curve length at which stagnation point is located
      • split_ratio::Float : ratio of lower to total surface length
      • separation_point_ratio_upper::Float : ratio of upper side separation point location relative to upper side surface length
      • separation_point_ratio_lower::Float : ratio of lower side separation point location relative to lower side surface length
      • cdc_upper::Float : drag coefficient times chord length for upper side
      • cdc_lower::Float : drag coefficient times chord length for lower side
      • vtdotpv::Vector{Float} : dot product of tangential velocity and panel vector for duct
      • boundary_layer_functions_lower::NamedTuple : NamedTuple of functions generated for use in boundary layer solution. For Head's method these are:
        • edge_velocity::FLOWMath.Akima : spline of surface velocity relative to surface length
        • edge_acceleration::FLOWMath.Akima : spline of derivatives of edge_velocity relative to surface length
        • edge_density::FLOWMath.Akima : spline of density relative to surface length (constant for Head's method)
        • edge_viscosity::FLOWMath.Akima : spline of viscosity relative to surface length (constant for Head's method)
      • boundary_layer_functions_upper::NamedTuple : same as boundary_layer_functions_lower but for upper side.
  • rotors::NamedTuple : NamedTuple of items related to rotor(s)
    • circulation::Matrix{Float} : blade element circulation values
    • panel_strengths::Matrix{Float} : balde source panel strengths
    • efficiency::Vector{Float} : rotor efficiency
    • inviscid_thrust::Vector{Float} : inviscid componenets of rotor thrust
    • inviscid_thrust_dist::Matrix{Float} : inviscid thrust component for each blade element
    • viscous_thrust::Vector{Float} : viscous componenets of rotor thrust
    • viscous_thrust_dist::Martix{Float} : viscous trhust component for each blade element
    • thrust::Vector{Float} : total rotor thrusts
    • CT::Vector{Float} : rotor thrust coefficients
    • inviscid_torque::Vector{Float} : inviscid components of rotor torque
    • inviscid_torque_dist::Matrix{Float} :inviscid torque component for each blade element
    • viscous_torque::Vector{Float} : viscous components of rotor torque
    • viscous_torque_dist::Matrix{Float} : viscous torque component for each blade element
    • torque::Vector{Float} : total rotor torques
    • CQ::Vector{Float} : rotor torque coefficients
    • inviscid_power::Vector{Float} : inviscid components of rotor power
    • inviscid_power_dist::Matrix{Float} : inviscid power component for each blade element
    • viscous_power::Vector{Float} : viscous components of rotor power
    • viscous_power_dist::Matrix{Float} : viscous power component for each blade element
    • power::Vector{Float} : total rotor powers
    • CP::Vector{Float} : rotor power coefficients
    • cl::Matrix{Float} : lift coefficient values for each blade element
    • cd::Matrix{Float} : drag coefficient values for each blade element
    • alpha::Matrix{Float} : angle of attack values for each blade element
    • beta1::Matrix{Float} : inflow angle values for each blade element
    • blade_normal_force_per_unit_span::Matrix{Float} : normal force per unit span values for each blade element
    • blade_tangential_force_per_unit_span::Matrix{Float} : tangential force per unit span values for each blade element
  • wake::NamedTuple : NamedTuple containing items related to the wake
    • panel_strengths::Vector{Float} : wake vortex panel strengths
  • totals::NamedTuple : NamedTuple containing total system values
    • thrust::Vector{Float} : total system thrust
    • torque::Vector{Float} : total system torque
    • power::Vector{Float} : total system power
    • CT::Float : total system thrust coefficient
    • CQ::Float : total system torque coefficient
    • CP::Float : total system power coefficient
    • total_efficiency::Vector{Float} : total propulsive efficiency
    • ideal_efficiency::Vector{Float} : ideal propulsive efficiency
  • intermediate_solve_values::NamedTuple : NamedTuple containing items used inside the solver at their converged values.
    • vz_rotor::Matrix{Float} : axial velocity induced on rotor blade elements
    • vtheta_rotor::Matrix{Float} : swirl velocity induced on rotor blade elements
    • reynolds::Matrix{Float} : Reynolds numbers at each blade element
    • mach::Matrix{Float} : Mach numbers at each blade element
    • Cz_rotor::Matrix{Float} : absolute frame axial velocity at rotor blade elements
    • Ctheta_rotor::Matrix{Float} : absolute frame swirl velocity at rotor blade elements
    • Cmag_rotor::Matrix{Float} : absolute frame meridional velocity at rotor blade elements
    • Gamma_tilde::Matrix{Float} : net circulation of upstream and current blade elements
    • H_tilde::Matrix{Float} : net enthalpy of upstream and current blade elements
    • deltaGamma2::Matrix{Float} : squared circulation changes between adjacent blade elements
    • deltaH::Matrix{Float} : enthalpy changes between adjacent blade elements
    • vz_wake::Vector{Float} : axial velocity induced on wake control points
    • vr_wake::Vector{Float} : radial velocity induced on wake control oints
    • Cm_wake::Vector{Float} : absolute frame meridional velocity at wake control points
    • Cm_avg::Vector{Float} : absolute frame meridional velocity at wake panel nodes
  • reference_values::NamedTuple : NamedTuple containing items used in computing coefficient values
    • Vinf::Float : Freestream velocity used in coefficient definitions
    • Vref::Float : Reference velocity used in coefficient definitions
source

Returning the Pre-process Objects

Sometimes, it may be desireable to return the pre-process objects, including:

  • panels which is a named tuple containing the body, rotor, and wake panel objects
  • ivb which are the unit induced velocities on the body panels
  • solve_parameter_tuple which contains all of the solver parameters
  • blade_elements which contains all of the blade element geometry and airfoil information
  • linsys which contains all the linear system objects for the panel method
  • idmaps which contains all the index mapping used throughout the solve and post-process.

In this case, we can use the return_inputs keyword argument when calling the analyze function to return a named tuple containing those pre-process objects.

outs, ins, success_flag = dt.analyze(
    ducted_rotor, operating_point, reference_parameters; return_inputs=true
)