How do I …?
Tasks in plain words. Each link goes to the section of the guide or the reference that does it; the section starts from the setup of its chapter.
Install and first run
| How do I … | Section |
|---|---|
| install CFD-craft for Python? | 1 Setup |
install the cfd-craft command? | 3 Setup |
| build from source? | 3 Setup |
| choose between Python, the command line and Rust? | Guide Which interface |
| run my first case? | 1 Run it |
| run a case from the shell? | 3 Check, run, report |
| check a case before I run it? | 1 Check the case |
Cases
| How do I … | Section |
|---|---|
| find out which fields a case may have? | 2 Find the allowed fields; case schema |
| change a parameter without editing the original case? | 2 Change a case without touching the original |
| understand an “unknown field” error? | 2 A wrong field is an error |
| know which unit a field has? | 2 Units and coordinates; units and conventions |
| know what the groups of a case mean? | 2 The groups of a case |
Results
| How do I … | Section |
|---|---|
| read a concentration in micrograms/m3? | 1 Read a receptor |
| tell whether a run converged? | 4 Assessment: what the checks support |
| tell why a run stopped? | 4 Termination: why the run stopped |
| make a script fail on a result that is not accepted? | 4 Require a verdict in a script |
| interpret exit code 2? | 3 Exit codes; 4 An incomplete run is still a result |
| know what each file in a run directory is? | 3 The files of a run |
| verify that a run directory is intact? | 3 Check, run, report |
| check the stored fields independently of the solver? | 3 Check the fields independently |
| look at the fields in ParaView? | 3 Look at the fields in ParaView |
| know whether a result is experimentally validated? | 4 Experimental validation is a separate label |
Sources, receptors, transport
| How do I … | Section |
|---|---|
| define a point, line or volume source? | 5 Three kinds of source, three rate units |
| convert a line or volume rate to kg/s? | 5 Three kinds of source, three rate units |
| add a sensor? | 5 Point and volume receptors |
choose between linear_upwind and muscl? | 5 MUSCL is sharper and not linear |
fix “steady sources need an open boundary” (CFD-E020)? | 5 A steady source needs a way out |
| simulate a release that is not steady? | 5 A release that is not steady |
| build a source-receptor response matrix? | 12 Unit responses and superposition |
| model particle size classes and get PM2.5 and PM10? | 22 Particle size classes |
| sample the concentration along a route? | 23 Declare a path receptor; Read the samples and the mean |
| turn street emission rates into line sources? | 24 Street emissions from map data |
Flow
| How do I … | Section |
|---|---|
| compute a laminar flow with walls and a moving lid? | 6 The case: walls, a moving lid, one periodic direction |
| run to a steady state? | 6 Run to a steady state |
| run a two-dimensional case? | 6 Two-dimensional runs |
| compare a cavity result with the Ghia reference? | 6 Compare with a numerical reference |
| test the pressure solver on my grid? | 6 What the pressure step does |
Budgets, preview, restart
| How do I … | Section |
|---|---|
| estimate memory and output before a run? | 7 What check estimates |
| limit steps, wall time, memory or threads? | 7 Budgets are part of the case |
| try a case on a coarser grid first? | 7 Preview on a coarser grid |
| understand why a preview was refused? | 7 When a preview is refused |
| stop a run at a wall-time limit? | 7 Stop on a time limit |
| cancel a run and keep what it computed? | 7 Cancel a run |
| resume an interrupted run? | 8 Stop by work, then resume |
| show that a restart reproduces the uninterrupted run? | 8 Is the resumed run the same run? |
| know which case changes keep a checkpoint usable? | 8 What a checkpoint fits |
Opt-in numerics
| How do I … | Section |
|---|---|
| get second-order accuracy for momentum? | 9 Second-order momentum advection |
| make a steady run converge in fewer iterations? | 9 Implicit steady iteration; The implicit recipe |
| use multigrid for the pressure equation? | 9 Multigrid for the pressure equation |
| see where the solver spends its time? | 9 Where the time goes: profile |
Buildings and canyons
| How do I … | Section |
|---|---|
| add buildings? | 10 The case: boxes, open top, wind |
| set the wind direction? | 10 The case: boxes, open top, wind; Another wind direction |
| model a traffic line source in a street? | 10 The case: boxes, open top, wind |
understand warnings CFD-W001 to CFD-W003? | 10 Read the warnings before the result |
| speed up a canyon run? | 10 The same steady state faster |
| know what a coarse canyon result does not show? | 10 What this result is not |
| run all canyon scenarios as one study? | 10 All committed scenarios in one study |
| describe a building with a polygon footprint? | 22 A building with a polygon footprint |
| see how well the grid represents a building? | 22 A building with a polygon footprint |
| import buildings from a GeoJSON or CityJSON map? | 22 Import buildings from a map |
| add a hedge or trees? | 22 Hedges and trees |
| use multigrid with buildings? | 22 Multigrid with buildings |
| run a wind-direction campaign? | 22 One case, twelve wind directions |
| know what a city-block result does not show? | 22 What these results are not |
Python and automation
| How do I … | Section |
|---|---|
| catch invalid input in Python? | 11 Errors carry diagnostics |
| pass a case as a dictionary, string or bytes? | 11 Inputs: dictionary, string or bytes |
| cancel a simulation from Python? | 11 Cancel from Python |
| run several simulations at once from Python? | 11 Threads, the GIL and concurrent calls |
script the command line with subprocess? | 11 Drive the CLI from Python |
| write an objective function that is allowed to fail? | 12 A fallible objective |
| infer source strengths from sensor readings? | 12 What sensors identify: the source-inference study |
| check transport against an independent solver? | 12 An independent reference solve |
| decide between an LP and a black-box optimizer? | 13 F1: a linear problem hides in the simulator |
| choose sensor locations? | 13 F2: coverage is not identifiability |
| optimize a flow setting without exploiting a coarse grid? | 13 F3: a design must survive a finer grid |
| run CFD-craft as an optimization job? | 14 Run the four jobs |
| build and inspect the fcmaes worker? | 14 The application worker |
| run wind directions as optimization jobs? | 14 Wind-direction jobs for a city block |
| give an agent a bounded task? | Agent entry point; A task for an agent in chapters 10, 12, 14, 16, 18, 19, 23 |
Mobile measurements
| How do I … | Section |
|---|---|
| simulate a sensor ride through a computed field? | 23 Simulate a ride |
| check path samples independently of the solver? | 23 Check the path independently |
| infer street emissions from rides? | 24 The smallest study |
| compute the response of rides to each street on one flow? | 24 One flow, one transport run per street |
| fit my own ride observations? | 24 Fit your own observations |
| find out which streets the rides cannot tell apart? | 24 Which streets can be told apart |
| plan how many passes a street needs? | 24 How many passes a street needs |
| choose routes under a time budget? | 24 Which routes under a time budget |
| know what a virtual ride or a fitted rate does not show? | 23 What a virtual ride is not; 24 What this is not |
OpenFOAM backend
| How do I … | Section |
|---|---|
| install the pinned OpenFOAM runtime? | 15 Install the pinned runtime |
| run an OpenFOAM cavity through the adapter? | 15 Generate, run and inspect |
| compare the native solver and OpenFOAM on one case? | 16 Two solvers against a numerical reference |
| compare OpenFOAM with backstep measurements? | 16 One solver against measurements |
| time both solvers fairly? | 16 Time both backends on one host |
| continue a long steady OpenFOAM solve? | 17 Continue on the same mesh |
| start a finer mesh from a coarse result? | 17 Start a finer mesh |
| audit mesh, face flux and y+ of a backstep run? | 18 Audit mesh, flux and y+ |
| run a bounded refinement campaign? | 19 Run the campaign |
Rust, help, evidence
| How do I … | Section |
|---|---|
| use the solver as a Rust library? | 20 Depend on the crate; Solve in process |
| read a run archive from Rust? | 20 Read a CLI archive |
| find what a diagnostic code means? | Diagnostics; 21 By symptom |
| find the measurement behind a number? | Evidence; comparison |
| run the documentation check myself? | Run the documentation check |