Expand description
Simulation management (FEA, CFD, …).
A simulation is an item of type simulation with the usual
lifecycle, revisions, check-out/check-in and change orders. Its files are
the model, the solver deck, selected results, the report and pictures. On
top of that a simulation revision has
- basis links – the item revisions it was computed with and, optionally, the exact file version (role geometry, mesh, material, load case or other). They belong to the simulation revision like BOM lines: changed only while it is checked out, copied by Revise and frozen at release;
- result values – key numbers such as the maximum stress or the pressure drop with unit, optional limits (pass/fail), load case and solver. They are entered in the UI, imported from a CSV/Excel table or written by a solver script through the REST API, and can be compared between two revisions.
A simulation is out of date when a newer revision of a basis item was
released, the basis revision became obsolete or the simulated file has a
newer version. Releasing or obsoleting a basis also flags the simulation
for a check through the change propagation (impacts, relation
simulation); acknowledging that check means “still valid, because …”.
Structs§
- Attention
Simulation - A simulation whose latest revision has failed result values or is out of date.
- Based
Simulation - A simulation based on a revision of an item (the other side of a basis link), shown on the part or assembly.
- Basis
Prefill - What the new-simulation form takes over from a basis revision.
- Compare
Summary - Counts of a comparison.
- Import
Summary - What an import of result values did.
- NewBasis
- NewItem
For - The input of
create_with_basis. - Result
Diff - One result value in either revision.
- Result
Input - A result value as entered or imported.
- Result
Summary - How many values passed and failed.
- Simulation
Basis - A revision (and file version) a simulation revision is based on.
- Simulation
Result - A key result value of a simulation revision.
Constants§
- GALLERY_
MAX_ BYTES - Largest picture shown on the simulation page (the browser loads each one).
- GALLERY_
MAX_ IMAGES - Pictures shown on the simulation page at most.
- MAX_
ATTENTION_ SCAN - At most this many simulations are checked for the dashboard card.
- MAX_
RESULTS - At most this many result values per simulation revision.
Functions§
- add_
basis - Adds a basis link to a simulation revision checked out by the actor.
- add_
result - Adds a result value to a simulation revision checked out by the actor.
- based_
on_ item - Simulations whose latest revision is based on a revision of the item. Only simulations the actor may see; the second value counts the others.
- bases
- The basis links of a simulation revision the actor may read; bases the actor may not see are placeholders.
- compare
- Compares the result values of two revisions of the same simulation.
- compare_
results - Matches the values of two revisions by name and load case (pure).
- compare_
summary - create_
with_ basis - Creates a simulation item together with its first files and its basis
link – the one-step counterpart of
items::create_with_filesfollowed byadd_basis. - default_
description - The description a new simulation gets from its basis.
- default_
name - The name a new simulation gets from its basis:
Simulation – <name>(cut to the 200 characters of an item name). - get_
basis - get_
result - import_
results - Writes a set of result values in one transaction: values with the same
name and load case are updated, new ones appended. With
replace, the values that are not in the set are removed (the set becomes the result table – what a solver script wants). - is_
gallery_ image - Whether a file of a simulation revision is shown as a picture in the
gallery: PNG, JPEG or WebP (by file name) of at most
GALLERY_MAX_BYTES. Rendered result pictures are the cheap way to show a CFD or FEA result – nothing is parsed, the browser draws the file. - needing_
attention - Simulations the actor may read whose latest revision (not obsolete) has a
value outside its limits or an out-of-date basis, the first
limitby number, how many there are in total, and whether the scan cap was hit (the total is then a lower bound). - out_
of_ date_ reason - What makes a basis out of date, from its stored facts (pure, see the
module docs).
Nonemeans the simulation still matches the basis. - parse_
results_ table - Reads result values from a CSV/TSV or spreadsheet table with the header
name,value,unit,limit_low,limit_high,load_case(further columns:solver,solver_version,note; German names andmin/maxwork too). Rows without a name are skipped; a value that is not a number is an error naming the row. - pick_
basis_ file - Picks the file of the basis revision whose current version a new
simulation pins: the STEP export if there is one (the neutral geometry),
else the first file of a known CAD/mesh format.
filesare(filename, format id); none fits →None(the revision alone is linked). - prefill_
from_ basis - The values the form New simulation based on … is prefilled with. A basis the actor may not read answers like a missing one (404), so the caller can fall back to the plain form without echoing anything.
- remove_
basis - Removes a basis link from a simulation revision checked out by the actor.
- remove_
result - Removes a result value from a simulation revision checked out by the actor.
- resolve_
basis - A basis revision the actor may read, by item number and revision code
(empty or
latest= the latest revision). Hidden = 404. - results
- The result values of a revision the actor may read, in their order.
- summarize
- to_csv
- The result values as CSV, in the import layout.
- update_
result - Changes a result value of a simulation revision checked out by the actor.