技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
core-data-and-geometry【数据与研究】Routes PhiFlow field, geometry, mesh, scene, and data-format workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill for the core PhiFlow objects that most other workflows build on: fields, grids, geometries, meshes, scenes, and field/scene I/O.
CenteredGrid, StaggeredGrid, PointCloud, Noise, and AngularVelocityBox, Sphere, Cuboid, Cylinder, UniformGrid, Mesh, Graph,
Heightmap, SDFGrid, and SDFScene.create(), Scene.at(), Scene.list(), Scene.write(),
Scene.read(), and scene cleanup helpersfield.read(), field.write(), field.resample(), field.sample(), and
field.reduce_sample()Geometry transformations and set operations such as shift, rotate,
union, and intersectioninstallation-and-backendsphysics-and-simulationoptimization-and-learningvisualization-and-uifrom phi.flow import *
from phi import field, geom, math
from phiml.math import batch, channel, instance, spatial, vec
CenteredGrid for scalar quantities and StaggeredGrid
for velocity-like vector fields.field.sample() when you need values at a
Geometry; use field.resample() or Field.at() when you need compatible
field representations.Scene.create() for new scenes, Scene.write() to store
fields, and Scene.read() to recover them. The scene format stores sim_
folders with *.npz field files.Box(x=1, y=1) or
the explicit slicing form Box['x,y', 0:1, 0:1].Mesh for unstructured surfaces or
volumes, and SDFGrid / SDF when you want implicit shapes.Domain as compatibility-only. New workflows should
construct grids directly with dictionaries and extrapolation= or
boundary= values.Scene.create(parent_directory, shape=(), name='sim', copy_calling_script=True, **dimensions)Scene.write(self, data=dict=None, frame=0, **kw_data)Scene.read(self, *names, frame=0, convert_to_backend=True)field.read(file, convert_to_backend=True) / field.write(field, file)field.resample(value, to, keep_boundary=False, **kwargs)field.sample(field, geometry, at='center', boundary=None, **kwargs)field.reduce_sample(field, geometry, **kwargs)Box(*args, **kwargs) and Box['x,y', ...]geom.Box, geom.Sphere, geom.Cylinder, geom.Mesh, geom.Graph,
geom.Heightmap, geom.SDFGrid, and geom.SDFreferences/workflows.mdreferences/troubleshooting.mdscripts/scene_roundtrip.pyFrom this sub-skill directory, run the smoke helper when you want to verify the field / scene I/O path:
python scripts/scene_roundtrip.py --resolution 16
The helper writes temporary scene data, reads it back through both the scene
API and field.read(), and cleans up afterwards.