Skip to main content
Version: 0.3.0

Server reference

Launch​

Each server takes one argument, the address to listen on:

scirocco/build-philote/src/philote/scirocco_server localhost:50051
scirocco/build-philote/src/philote/scirocco_kulfan_server localhost:50052

They run in the foreground and log connections to stdout. To have a script own its server, start it as a subprocess and wait for the channel:

import subprocess
import grpc

proc = subprocess.Popen([
"scirocco/build-philote/src/philote/scirocco_server", "localhost:50051"
])
try:
with grpc.insecure_channel("localhost:50051") as channel:
grpc.channel_ready_future(channel).result(timeout=15)
# Connect your Philote client to this channel.
finally:
proc.terminate()
try:
proc.wait(timeout=5)
except subprocess.TimeoutExpired:
proc.kill()
proc.wait()

The optimization examples start and stop their own servers this way.

Analysis server​

scirocco_server hosts the analysis discipline (SiroccoDiscipline in the C++ source).

Options
npanelPanel count. x has 2 * (npanel + 1) entries.
naca or coordinatesExactly one. A NACA string, or {"x": [...], "z": [...]}. Only initializes the solver; x supplies the shape analyzed.
hdf5_fileOptional history file, written by the server. Needs SCIROCCO_HDF5_OUTPUT=ON.
Inputs
xPanel nodes, all x then all z, lower trailing edge → upper trailing edge. Replaces the panels directly.
alphaAngle of attack in degrees
ReReynolds number; 0 for inviscid
MaMach number
Outputs
cl, cd, cmWith analytic partials with respect to every input

A failed solve raises an error instead of returning numbers. To impose a lift coefficient, make alpha a design variable and constrain cl.

CST geometry server​

scirocco_kulfan_server hosts KulfanDiscipline.

Options
n_cst_upper, n_cst_lowerCoefficients per surface, 3–256
npanelEven panel count
te_upper, te_lowerTrailing-edge z offsets
Inputs
cst_upper, cst_lowerCoefficient vectors
Outputs
xPanel nodes in the analysis server's layout
smoothness_upper, smoothness_lowerSecond differences of the coefficients, n − 2 each

Valid ranges and layouts are in Conventions.