Embody 0.2.1
dotnet add package Embody --version 0.2.1
NuGet\Install-Package Embody -Version 0.2.1
<PackageReference Include="Embody" Version="0.2.1" />
<PackageVersion Include="Embody" Version="0.2.1" />
<PackageReference Include="Embody" />
paket add Embody --version 0.2.1
#r "nuget: Embody, 0.2.1"
#addin nuget:?package=Embody&version=0.2.1
#tool nuget:?package=Embody&version=0.2.1
Embody
Embody is an F# library that allows you to easily define, execute, and validate $n$-body simulations.
Summary
Embody started out as an interactive .NET notebook where you could simulate and evaluate $n$-body systems (most notably, the Earth-Moon-Sun system, and Jupiter with its myriad of moons). The notebook kept on growing, so ultimately most of the code was moved into a separate package.
Currently, Embody is a single package that tackles a couple different responsibilities, including: vector operations, numerical integration, and plot visualisation.
Getting started
The standard way of working with the library is via interactive .NET notebooks.
Prerequisites
- VS Code
- .NET 6 SDK
- .NET Interactive Notebooks extension
First notebook
In order to create a blank notebook:
Press
Ctrl + Shift + P
in VS Code editor.Select the ".NET Interactive: Create new blank notebook" option.
Select "Create as .dib".
Select "F#".
The notebook should open. Type the following line into the code block:
#r "nuget: Embody"
and then press
Shift + Enter
or press "Execute cell".In general, you should specify a package version after the package name, like this:
#r "nuget: Embody, 0.2.0"
. For the most recent version, please check the "Script & Interactive" tab at the Package page.After the package is imported, you can perform a simple vector arithmetic to verify if the package works. Type the following code into the second code block:
open Embody.LinearAlgebra let a = vector3 0.1 0.2 0.3 let b = vector3 1.0 2.0 3.0 a + b
After executing the cell, you should see the following output: | x | y | z | |-----|-----|-----| | 1.1 | 2.2 | 3.3 |
Congratulations! You've successfully created a .NET interactive notebook, and imported the Embody package. The next step would be to define an $n$-body system. Example(s) can be found here.
Future plans / TODOs
- Documentation page.
- Theoretical background behind implemented numerical methods and orbital simulations.
- Performance optimization.
- Memory usage consideration (it is currently a bit too easy to have all your RAM consumed by a long-running simulation).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. |
-
net6.0
- FSharp.Core (>= 6.0.7)
- XPlot.Plotly (>= 4.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.