Prepare your study
Delta-V reads one file: a study zip. It holds your finished solver runs, already checked and resampled onto one grid, with a small settings file. You make it from your OpenFOAM cases with one command.
-
Put your finished runs in one folder
my-study/ ├── study.json ├── runs.csv ├── cases/ │ └── <run_id>/ └── geometry/ └── body.csvstudy.jsondescribes the study,runs.csvhas one row per run with its settings,cases/has one OpenFOAM case per run, andgeometry/has the outline of the body. -
Run the importer
python -m deltav_flow.importer my-study --out study.zipThe same command packs 2D and 3D studies. It checks every run, tells you what to fix, and writes
study.ziponce nothing is in the way. -
Upload the study zip
Drop
study.zipon the study page. The site checks it once more and shows you your runs.
More detail, when you need it
What goes in the study folderShow details
runs.csv
One row per finished run.
run_id-
The name of the run's folder in
cases/. Letters, digits,.,_and-, starting with a letter or digit, at most 64 characters. inlet_speed- The free-stream speed of this run.
- One column per setting
-
The numbers that change between runs, under names you choose, for example
reynolds,aspect,alpha. Up to 8 settings. t_average-
The time averaging starts for this run. Leave it out if
study.jsongives one start time for every run. - Optional
-
shape_filewhen the body changes per run, your owncd_meanandcl_rms(the importer compares them with its own),solver_seconds,coresandnotes.
Each run folder
The importer needs these files from each OpenFOAM case. You can send the whole case; the rest is ignored.
cases/<run_id>/
├── system/controlDict
├── <latest time>/C
├── <latest time>/UMean
├── <latest time>/pMean
├── <latest time>/pPrime2Mean (optional)
└── postProcessing/forceCoeffs/<t0>/coefficient.dat
Cholds the cell centres: runpostProcess -func writeCellCentres -latestTime.UMeanandpMeancome from thefieldAveragefunction object.coefficient.datcomes from theforceCoeffsfunction object on the body's wall patch.- Fields are written as text:
writeFormat ascii, no compression.
The body outline
A CSV with columns x,y and at least 64 points going once around the body, in the solver's
coordinates. One file, geometry/body.csv, when every run has the same body; one file per run,
named in the shape_file column, when the shape changes. For a 3D study it is the cross-section
of the column.
What study.json holdsShow details
{
"schema": "deltav-input/1",
"name": "Ellipse sweep",
"solver": {"name": "openfoam", "version": "v2406"},
"reference": {
"length": 1.0,
"density": 1.0,
"kinematic_viscosity": 0.01,
"body_center": [0.0, 0.0]
},
"flow_direction": [1, 0],
"body_patch": "body",
"tolerance": {"field": 0.06, "cd_mean": 0.03, "cl_rms": 0.01},
"check_runs": ["run-03", "run-07", "run-11", "run-15"]
}
- Settings
-
The settings are the columns of
runs.csv; their names appear on the site as you wrote them.rangescan give a low and a high value for each one. Without it, the range is the smallest and largest value among your runs. - Units
-
referencegives the length, density and kinematic viscosity your solver used, and where the body's centre is. With each run's inlet speed they give the Reynolds number, and they make the results comparable between runs: lengths in body lengths, pressure as a coefficient, velocities as a share of the inlet speed. The flow runs along +x. - Check runs
-
check_runsnames the runs kept out of training. The reported error is measured on them, so they stay the same for the life of the study. Leave the key out and a third of your runs are drawn, usingseed. A study needs at least 2 check runs and 2 training runs. - Targets
-
toleranceis the accuracy you need: for the flow field, for drag (cd_mean) and for lift (cl_rms). The values above are the defaults. - Shape rule
-
If the body is an ellipse set by two of your settings, say so:
"shape": {"kind": "ellipse", "aspect_column": "aspect", "angle_column": "alpha"}. The site can then draw the body at any setting in your ranges, so predictions are not limited to the settings you ran. A study where every run has the same body needs no rule. - Also
-
body_patchis the wall patch the forces are computed on.averaginggives the time averaging starts, as onestart_timeor as the name of a column inruns.csv.reynolds_columnnames the setting that is the Reynolds number, when the inlet speed is not itself a setting.
The importer command, 2D and 3DShow details
A 2D study
python -m deltav_flow.importer my-study --out study.zip
Each run's averaged fields are resampled onto a window around the body, from 2 body lengths upstream to 14 downstream and 4 to each side, on a 64 × 128 grid.
A 3D study
The command is the same. A study says it is 3D in study.json:
"dimension": 3,
"reference": {..., "body_center": [0.0, 0.0, 0.0]},
"flow_direction": [1, 0, 0]
python -m deltav_flow.importer my-3d-study --out study-3d.zip
3D covers one kind of case: a column standing on a floor, with the same cross-section at every height, on
a mesh built by stacking the same cells in layers along z. The third value of body_center is
the height of the floor. The window reaches 4 body lengths above the floor, on a 32 × 64 × 128 grid.
Good to know
- You can point the command at a zip of the study folder instead of the folder.
- It prints one line per finding, each with what to fix. Add
--jsonto get them as JSON. - Findings marked
errorstop the study zip from being written. Findings markedwarningdo not. - The importer is
deltav_flow/importer.pyin the Delta-V code.
What is inside the study zipShow details
study.zip
├── study.json
├── runs.csv
├── fields/
│ ├── <run_id>_input.npy
│ └── <run_id>_result.npy
└── extract/
└── <run_id>.json
study.jsonis your file, unchanged.runs.csvis your table plus the drag, lift and shedding frequency the importer worked out for each run, and whether the run had settled._input.npyis the body on the grid: where the fluid is, the inlet value and the distance to the wall._result.npyholds the averaged fields: pressure (mean and fluctuation) and the mean velocity in each direction.extract/keeps the importer's record for each run.
The format sample, not real CFD has
exactly this layout, with a short README in place of extract/.
Sizes and run countsShow details
- Runs
- A study needs at least 12 finished runs and can hold up to 512. With fewer than 24 the importer notes that the error bands will be wide.
- 2D archive
- The importer takes a zip of the study folder up to 2 GB, or 6 GB unpacked.
- 3D archive
- Up to 8 GB, or 24 GB unpacked.
- Files
- Up to 200,000 files in one archive.
- Study zip
- Much smaller than the cases it came from: about 0.25 MB a run in 2D and about 9.4 MB a run in 3D, before compression.
Some copies of the site can also take the zip of your study folder and run the importer for you. The upload box says so when it can.
What the importer checks in your runsShow details
Every finding names the run, says what is wrong and how to fix it. These stop the study zip:
- No time folder other than
0 - Send the latest time folder.
C,UMeanorpMeanis missing- Add
writeCellCentresand thefieldAveragefunction object, then rerun the post-processing. - A field is binary or compressed
- Set
writeFormat asciiandwriteCompression off, then runfoamFormatConvert -latestTime. - Fields of different lengths
- Send fields from the same time folder of the same mesh.
- A 2D study with a run that varies in z, or a 3D study with a run of one layer
- Set or remove
"dimension": 3instudy.json, or send the matching case. - A 3D mesh that is not layers of the same cells
- Send a mesh extruded along z; other 3D meshes are not supported yet.
- No force history, or one that uses other reference values
- Add the
forceCoeffsfunction object for the body patch, with the study's reference values. - Too short an averaging window (under 200 force samples or 5 shedding cycles)
- Run longer before averaging.
- A value that is not a number
- Check the run; it probably diverged.
- The mesh does not cover the window around the body
- Enlarge the domain, or check
body_center. - The outline is missing, has under 64 points, crosses itself, leaves out the body centre or reaches outside the window
- Export the outline again as an
x,yCSV at a finer spacing, and check the body centre. - Two runs with the same id or the same settings, a row without a folder, or a folder without a row
- Give every run its own id, settings, row and folder.
These are noted and the run is kept:
- The averages had not settled (drag moves by 1% or more, or lift by 5% or more, between the two halves of the window)
- Running longer usually fixes it.
- Your own drag or lift differs from the importer's by more than 2%
- Check the averaging window and the reference values.
pPrime2Meanis missing- The pressure fluctuation field is left out; everything else works.
- A setting has the same value in every run
- It is ignored.
What the site checks when you uploadShow details
The site reads the study zip again before it shows you anything. If something is off, it lists every reason and what to do. A study zip straight from the importer passes these.
- It is a zip, not password-protected, with plain file paths
- Upload the study zip written by the importer, unencrypted. If it was damaged on the way, re-create it.
- Only study files are inside
- Remove anything else. A
README.md, theextract/folder and macOS extras are fine. study.jsonis valid- It needs the schema line, a name, the solver, the reference values as positive numbers, the body centre, the flow along +x, the body patch, a dimension of 2 or 3 and positive targets.
runs.csvis readable, with one id per run- Export it as UTF-8 CSV and give every run its own id.
- 12 to 512 runs, and up to 8 settings
- Add finished runs.
- Every run has a number for each setting, the inlet speed, drag and lift
- Pack the study again with the importer.
- Every run has its two field files, on the right grid, with no missing values
- Pack the study again with the importer.
- Every run lies inside the ranges, and each range has low below high
- Widen
rangesinstudy.json. - The check runs are different runs of this study, leaving at least 2 check and 2 training runs
- Correct
check_runsinstudy.json.
When you add runs to a study later, the new study zip holds only the new runs. It needs the same reference
values and new run ids, and settings inside the ranges if your study.json gives them.