forked from 1b-agent/fieldcraft-upstream
Model: Newtonian fluid materials; fluid domains (box, spacing, conditions on the box faces, obstacle bodies with conditions on their named faces, initial velocity, body acceleration); fluid steps with caps. Deck writers refuse fluid steps; a fluid-only model needs no mesh in model.check; one step selector (Model::select_step) for every solver. New L2 crate modelcraft-lbm: D3Q19 two-relaxation-time collision with Guo forcing; halfway bounce-back walls (moving walls after Ladd), slip faces, periodic pairs; Zou–He velocity and pressure faces with the D3Q19 transverse correction; obstacles voxelised from the face-tagged boundary surface with exact predicates and symbolic perturbation; momentum-exchange forces per box face and per B-rep face; unit conversion, automatic time step and Mach/tau limits; bounded runs with frames and force histories. Engine: model.fluid_domain.create/edit/delete, model.fluid_domain.boundary, solve.fluid (obstacles from the open design or imported surfaces, lowerable caps), solve.probe for fluid fields and wall force histories. Fluid Domain, Inlet & Outlet and Lattice Boltzmann toolbar entries are ready. Verification (analytic): plane Poiseuille exact with Λ = 3/16 and second order (2.000) with Λ = 1/4; Couette exact with the wall shear; Taylor–Green decay second order (2.01, 2.00); staircase pipe; Stokes drag of a sphere array within 1.7% of Hasimoto at R = 6; Zou–He channel; mass conserved to round-off; bit-for-bit reproducibility. Benchmark: Schäfer–Turek 2D-1. Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
117 lines
4.5 KiB
TOML
117 lines
4.5 KiB
TOML
[workspace]
|
|
resolver = "3"
|
|
members = ["crates/*", "apps/*", "xtask"]
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
license = "MIT OR Apache-2.0"
|
|
rust-version = "1.95"
|
|
authors = ["ModelCraft contributors"]
|
|
repository = "https://github.com/jyviko/modelcraft"
|
|
|
|
[workspace.dependencies]
|
|
# internal
|
|
modelcraft-model = { path = "crates/model" }
|
|
modelcraft-geometry = { path = "crates/geometry" }
|
|
modelcraft-mesh = { path = "crates/mesh" }
|
|
modelcraft-decks = { path = "crates/decks" }
|
|
modelcraft-io = { path = "crates/io" }
|
|
modelcraft-fem = { path = "crates/fem" }
|
|
modelcraft-solver = { path = "crates/solver" }
|
|
modelcraft-explicit = { path = "crates/explicit" }
|
|
modelcraft-lbm = { path = "crates/lbm" }
|
|
modelcraft-engine = { path = "crates/engine" }
|
|
modelcraft-testkit = { path = "crates/testkit" }
|
|
modelcraft-render = { path = "crates/render" }
|
|
modelcraft-ui-egui = { path = "crates/ui-egui" }
|
|
|
|
# foundation
|
|
thiserror = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = { version = "1", features = ["float_roundtrip"] }
|
|
log = "0.4"
|
|
|
|
# 3MF packages (docs/formats/tagged-mesh.md): the same versions SolidCraft uses.
|
|
zip = { version = "3", default-features = false, features = ["deflate"] }
|
|
quick-xml = "0.41"
|
|
|
|
# content hashes and part checksums of .modelcraft files (the version SolidCraft uses)
|
|
sha2 = "0.10"
|
|
|
|
# images (PNG snapshots and screenshots)
|
|
png = "0.18"
|
|
# SVG toolbar icons rasterised in the UI (no text, fonts or raster images in icons)
|
|
resvg = { version = "0.48", default-features = false }
|
|
|
|
# ui: the same egui/eframe/egui-wgpu line as SolidCraft
|
|
egui = "0.36"
|
|
eframe = { version = "0.36", default-features = false }
|
|
egui-wgpu = "0.36"
|
|
|
|
# Geometry: SolidCraft's B-rep kernel (MIT OR Apache-2.0), pinned. Only crates/geometry uses it
|
|
# (plan/adr/0001-libraries.md).
|
|
solidcraft-geom = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
solidcraft-kernel = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
solidcraft-doc = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
solidcraft-io = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
# Runs SolidCraft command scripts (the test corpus recipes); only behind modelcraft-geometry's
|
|
# `scripts` feature.
|
|
solidcraft-engine = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
|
|
[workspace.lints.rust]
|
|
unsafe_code = "forbid"
|
|
|
|
[workspace.lints.clippy]
|
|
dbg_macro = "warn"
|
|
todo = "warn"
|
|
too_many_arguments = "allow"
|
|
type_complexity = "allow"
|
|
# `!(x > tol)` is our idiom for "not a usable number" (NaN-safe).
|
|
neg_cmp_op_on_partial_ord = "allow"
|
|
|
|
[profile.dev.package."*"]
|
|
opt-level = 2
|
|
|
|
[profile.dev]
|
|
opt-level = 1
|
|
|
|
# The lattice Boltzmann kernels are compute loops over millions of cells; their verification
|
|
# runs (tests) need them optimised.
|
|
[profile.dev.package.modelcraft-lbm]
|
|
opt-level = 3
|
|
|
|
# Tests and lints (`cargo xtask ci`, GitHub CI). Debug assertions are off because truck's
|
|
# debug-only checks reject valid geometry (SolidCraft builds its tests the same way).
|
|
[profile.ci]
|
|
inherits = "dev"
|
|
opt-level = 1
|
|
debug = "line-tables-only"
|
|
debug-assertions = false
|
|
overflow-checks = true
|
|
incremental = false
|
|
|
|
[profile.ci.package."*"]
|
|
opt-level = 2
|
|
|
|
[profile.ci.package.modelcraft-lbm]
|
|
opt-level = 3
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
lto = "thin"
|
|
codegen-units = 16
|
|
debug = "line-tables-only"
|
|
|
|
# SolidCraft builds truck and egui-wgpu with local fixes (its vendor/ directory). Patches don't
|
|
# reach a dependent workspace, so ModelCraft applies the same ones from the same pinned commit;
|
|
# keep this list and the rev in step with SolidCraft's [patch.crates-io].
|
|
[patch.crates-io]
|
|
truck-shapeops = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
truck-stepio = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
truck-meshalgo = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
matext4cgmath = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|
|
# egui-wgpu with SolidCraft's fixes (vendor/egui-wgpu there): MSAA clamped to what the device
|
|
# supports and 1x on OpenGL adapters, so the requested 4x never fails pipeline validation at start.
|
|
egui-wgpu = { git = "https://github.com/bherbruck/solidcraft", rev = "de1479029dd6821cffd28b70688a58e7f61f0cfd" }
|