Marey.Sim 0.7.0

dotnet add package Marey.Sim --version 0.7.0
                    
NuGet\Install-Package Marey.Sim -Version 0.7.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Marey.Sim" Version="0.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Marey.Sim" Version="0.7.0" />
                    
Directory.Packages.props
<PackageReference Include="Marey.Sim" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Marey.Sim --version 0.7.0
                    
#r "nuget: Marey.Sim, 0.7.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Marey.Sim@0.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Marey.Sim&version=0.7.0
                    
Install as a Cake Addin
#tool nuget:?package=Marey.Sim&version=0.7.0
                    
Install as a Cake Tool

Marey.Sim

Simulation for Marey, a dimensionally-typed visualization system for F#. A simulation is a start and a step, and its trajectory is an animation: it seeks, it films, and a seek to any time is exactly the state a straight run reaches.

#r "nuget: Marey.Sim"
#r "nuget: Marey.Backend.Svg"

open Marey
open Marey.UnitsOfMeasure

// A driven, damped pendulum: an angle in rad and a rate in rad/s, stepped by RK4 at 1 ms.
let pendulum: Flow2T<rad, rad/s, s> =
    fun t th om -> struct (om, -9.81<rad/s^2> * sin (float th) - 0.2</s> * om + 0.5<rad/s^2> * cos (1.3 * float t))

let sim = Sim.ofStep 1e-3<s> (Ode.rk4 pendulum) (struct (0.5<rad>, 0.0<rad/s>))
let trajectory = Sim.trajectory 1.0<s> 60.0<s> sim

let path = Array.init 600 (fun i -> trajectory.At(float i * 0.1<s>))

Chart.line Derived.radian (U.div Derived.radian U.second) (path |> Array.map (fun (struct (th, _)) -> th)) (path |> Array.map (fun (struct (_, om)) -> om))
|> Chart.toSvg SvgBackend.render "pendulum.svg" (Chart.size 640.0 480.0)
  • Integrators typed by the shape of the state. Ode.verlet and Ode.leapfrog over positions and velocities in one unit, with the acceleration checked to be in that unit per second squared; Ode.euler, Ode.rk4 and Ode.dopri5 (Dormand–Prince 4(5), dense output) over a plane flow with time; and eulerWith, rk4With, dopri5With over any record given a Tangent. A rate in the wrong unit does not compile.
  • Trajectories. Sim.trajectory every horizon checkpoints one straight run and seeks by replay, bit for bit equal to the run, on any thread. Invariants (Sim.withInvariant) and their drift (Sim.drift, Drift.chart).
  • Events. A function of the state crossing zero, located in time, with a response; a minimum separation ends a Zeno sequence at rest instead of looping. Collide.step resolves hard-disc contacts exactly within a step, with a grid broad phase.
  • Sections and particles. Poincare.stroboscopic and Poincare.section. Unsteady fields, analytic or from grids (ofSnapshots, ofFunction), carried by Particles.step stage by stage; streaklines and pathlines.
  • Grid solvers. Fdm.heat (explicit, with its stability limit refused in seconds), Fdm.heatImplicit (Crank–Nicolson by ADI), Fdm.wave, Fdm.poisson, on the compact five-point stencil with Dirichlet, Neumann and periodic sides.
  • Fluids. Stam.step, stable fluids on a staggered grid with the pressure by multigrid, walls or periodic edges, viscosity, a dye in its own unit and a buoyancy per unit of it; Lbm.step, lattice Boltzmann D2Q9 with obstacles, walls, an inflow and an outflow, refusing a relaxation time at or below ½ with the numbers. Marey.Backend.Gpu steps both on a GPU (GpuSim).

Compiles under Fable. A chaotic system run in a browser and the same one under .NET are different trajectories after tens of seconds, because JavaScript's sin and exp differ in the last bit; both are correct to the integrator's order.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Marey.Sim:

Package Downloads
Marey.Backend.Gpu

GPU rendering for Marey: Skia on OpenGL, with batched marks drawn by the GPU directly. A figure, a film's frames or a million points, offscreen; fluid solvers and LIC on the GPU.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 108 10/17/2026
0.6.0 108 10/11/2026