Example - simulating a pendulum:
from mechanics_dsl import PhysicsCompiler
compiler = PhysicsCompiler()
compiler.compile_dsl(r"""
\system{pendulum}
\lagrangian{\frac{1}{2} m l^2 \dot{\theta}^2 + m g l \cos(\theta)}
""")
solution = compiler.simulate((0, 10))
It automatically derives equations of motion and can generate C++/Rust/CUDA code.Feedback welcome!