Skip to content

Problem, Strategy, Workflow

FlowDesign separates design work into three layers.

FlowDesign framework

Problem

A DesignProblem defines what a design means and how it is scored:

problem = DesignProblem(
    geometry=...,
    evaluator=...,
    objectives=[...],
    constraints=[...],
)

It exposes:

outputs = problem.evaluate(x)
loss = problem.loss(x)
checks = problem.check_constraints(x)
mask = problem.is_feasible(x)

Strategy

A strategy defines how candidate designs are generated or improved:

result = strategy.run(problem, model, sampler=None)

Strategies should not own geometry, physics, or objective definitions. They consume a DesignProblem and return a DesignResult.

Workflow

A workflow coordinates training, generation, evaluation, and saving. Workflows can be written directly in Python or driven by YAML:

flowdesign generate --config configs/airfoil/dflow.yaml

This separation keeps new domains easy to add. A structural mechanics problem can reuse the same strategy layer by swapping in an FFD geometry, FEM evaluator, stress objective, and displacement constraints.