pina-3d
Guidance for composing 3D PINA problems — sampling budgets, activation choices, and gotchas specific to three spatial axes plus optional time.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guidance for composing 3D PINA problems — sampling budgets, activation choices, and gotchas specific to three spatial axes plus optional time.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Residual-based adaptive refinement for PINNs — use RBAPINN to grow attention on high-loss regions without hand-crafting a refined mesh. True h/p-AMR is out of scope for now.
Use an unstructured mesh (STL/OBJ/VTK/GMSH) as the spatial domain for a PINA problem — attach a MeshSpec and reference tagged cell regions via SubdomainSpec.mesh_ref.
Compose inverse / parameter-identification PINA problems — declare UnknownParameterSpec, attach ObservationSpec from data or synthetic sampling, and the composer wires PINA InverseProblem automatically.
Compose coupled multi-field PINA problems (e.g. thermo-elasticity, magnetohydrodynamics) by listing multiple EquationSpecs on one ProblemSpec — no new schema needed.
Pick and build a neural-network architecture for a registered PINA Problem via ModelManager
Compose a PINA Problem from primitives (equations + subdomains + conditions) via compose_problem. No hardcoded kinds — any PDE that sympy + PINA operators can express is reachable.
| name | pina-3d |
| description | Guidance for composing 3D PINA problems — sampling budgets, activation choices, and gotchas specific to three spatial axes plus optional time. |
| triggers | ["3d problem","three dimensional pde","volumetric pde","3d poisson","3d heat","3d navier-stokes","lid-driven cavity","3d wave"] |
3D is the engineering default for this project. The composer already
handles arbitrary axis sets — {"x": [...], "y": [...], "z": [...]}
produces a 3D SpatialProblem with zero Python changes; adding
"t": [...] promotes to TimeDependentProblem. This skill
captures the scaling + numerical considerations that only become
important once you leave 2D.
spec = ProblemSpec(
name="heat_3d",
output_variables=["u"],
domain_bounds={
"x": [0.0, 1.0], "y": [0.0, 1.0], "z": [0.0, 1.0],
"t": [0.0, 1.0],
},
subdomains=[
SubdomainSpec(name="D", bounds={
"x": [0.0, 1.0], "y": [0.0, 1.0], "z": [0.0, 1.0], "t": [0.0, 1.0],
}),
# Faces: pin exactly one axis
SubdomainSpec(name="x0", bounds={
"x": 0.0, "y": [0,1], "z": [0,1], "t": [0,1]
}),
# … and so on for the other five walls.
],
equations=[
EquationSpec(
name="heat",
form="u_t - alpha*(u_xx + u_yy + u_zz)",
outputs=["u"],
derivatives=[
DerivativeSpec(name="u_t", field="u", wrt=["t"]),
DerivativeSpec(name="u_xx", field="u", wrt=["x","x"]),
DerivativeSpec(name="u_yy", field="u", wrt=["y","y"]),
DerivativeSpec(name="u_zz", field="u", wrt=["z","z"]),
],
parameters={"alpha": 0.1},
),
],
conditions=[
ConditionSpec(subdomain="D", kind="equation", equation_name="heat"),
# Dirichlet walls via fixed_value; IC via a t=0 subdomain + equation_inline.
],
)
A 2D Poisson trains well on ~1k collocation points; 3D needs 10x that just to cover the volume evenly. Rule of thumb:
n_points = 8000–16000.n_points = 20000–40000.sample_mode="latin" — uniform random gets clustery quickly
in 3D.tanh or silu. Avoid relu — its second
derivative is zero, which nulls the viscous / diffusive terms.ModelManager.create("fno", ...) is the right
first pick.The provenance dashboard (Phase C3) uses pyvista for 3D rendering.
Export inference output via Trainer.test() on a volumetric grid
(e.g. 32³) and load the resulting numpy array into a pyvista.ImageData.
Until that's wired, fall back to 2D slices — the 2D viz in
examples/02_provenance_dashboard.py takes (x, y, value) at
fixed z, t.
input_variables on a 3D+time problem is ["x","y","z","t"]
— verify with cls().input_variables after composing.Δu + … as a single wrt=["x","x"];
list each direction as its own derivative so the operator graph
stays shallow.