Skip to main content
Version: 0.3.0

KulfanDiscipline

The Philote discipline that turns CST coefficients into panel nodes, with exact partials. scirocco_kulfan_server runs it. Header: scirocco/kulfan_discipline.h.

See Server reference to launch it.

Class shape​

Each surface is parameterized as

with , class function

(round LE, sharp TE), and shape function

The Bernstein coefficients are the design variables. With the sign convention above, non-negative coefficients and te_upper >= te_lower keep the upper surface at or above the lower one. This allows zero thickness; use thickness or area constraints to exclude degenerate designs.

Options​

Set at discipline construction.

OptionTypeDefaultMeaning
n_cst_upperint6Number of upper-surface Bernstein coefficients
n_cst_lowerint6Number of lower-surface Bernstein coefficients
npanelint (even)200Total panels; npoint = npanel + 1
te_upperdouble0.0Fixed upper-surface TE y-offset
te_lowerdouble0.0Fixed lower-surface TE y-offset

The defaults give a closed trailing edge, which is fine for inviscid analysis. For viscous analysis set te_upper - te_lower to at least 1e-6 chord (the examples use 0.00126, 0.126% chord); otherwise the analysis discipline raises an error.

Inputs​

NameShape
cst_uppern_cst_upper
cst_lowern_cst_lower

Outputs​

NameShapeMeaning
x2 · npointPanel-node coordinates, x-block then z-block, TE-lower → LE → TE-upper. Directly compatible with SiroccoDiscipline.x input
smoothness_uppern_cst_upper − 2Second differences for the upper-surface coefficients
smoothness_lowern_cst_lower − 2Same, lower surface

Bounding the smoothness outputs limits the second derivative of the shape polynomial and discourages coefficient oscillations. This linear constraint is not a direct bound on the curvature of the complete surface. See CST design for the recipe.

C++ class​

class KulfanDiscipline : public philote::ExplicitDiscipline {
public:
KulfanDiscipline() = default;
~KulfanDiscipline() noexcept = default;

void Initialize() override;
void SetOptions(const google::protobuf::Struct& options) override;
void Configure() override;
void Setup() override;
void SetupPartials() override;
void Compute(const philote::Variables& inputs,
philote::Variables& outputs) override;
void ComputePartials(const philote::Variables& inputs,
philote::Partials& partials) override;

// Test-friendly accessors
int npoint() const;
int npanel() const;
int n_cst_upper() const;
int n_cst_lower() const;
const VectorXd& psi_eval() const;
};

You normally use it through scirocco_kulfan_server from Python rather than constructing it in C++.

Evaluation stations​

The discipline samples the surface at cosine-clustered stations on the half-chord. The number of stations is npanel/2 + 1, with mirror points giving the full panel-node grid. The psi_eval() accessor exposes the half-chord vector for testing.

Building, launching, using​

With the server running, connect from any Philote client. In Python, with OpenMDAO as the framework:

from philote_mdo.openmdao import RemoteExplicitComponent
import grpc

channel = grpc.insecure_channel("localhost:50052")
geometry = RemoteExplicitComponent(
channel=channel,
n_cst_upper=8, n_cst_lower=8, npanel=100,
te_upper=+0.003, te_lower=-0.003,
)

See also​