Skip to content

Commit 6b2aa3d

Browse files
committed
Update of README.md file
1 parent 322831a commit 6b2aa3d

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,34 @@
55

66
The [Modia Tutorial](https://modiasim.github.io/Modia.jl/stable/tutorial/GettingStarted.html) provides an introduction to Modia. Modia is part of [ModiaSim](https://modiasim.github.io/docs/).
77

8-
Modia is a Julia package for modeling and simulation of multidomain engineering systems
9-
described by differential equations, algebraic equations, and (space-discretized) partial differential equations. It shares many powerful features of the [Modelica language](https://www.modelica.org/modelicalanguage), together with features not available in Modelica.
8+
[Modia](https://github.com/ModiaSim/Modia.jl) is a minimalistic environment in form of a Julia package to model and simulate physical systems (electrical, mechanical, thermo-dynamical, etc.) described by differential and algebraic equations. A user defines a model on a high level with model components (like a mechanical body, an electrical resistance, or a pipe) that are physically connected together. A model component is constructed by "expression = expression" equations. The defined model is symbolically processed (for example, equations might be analytically differentiated) with algorithms from package [ModiaBase.jl](https://github.com/ModiaSim/ModiaBase.jl). From the transformed model a Julia function is generated that is used to simulate the model with integrators from [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl).
9+
The basic type of the floating point variables is usually `Float64`, but can be set to any
10+
type `FloatType<:AbstractFloat` via `@instantiateModel(..., FloatType = xxx)`, for example
11+
it can be set to `Float32, DoubleFloat, Measurement{Float64}, StaticParticles{Float64,100}`.
1012

11-
A user defines a model on a high level with model components (like an electrical resistance, a rotational inertia, a rod with heat transfer, a PI controller etc.) that are physically connected together. A model component is constructed by "expression = expression" equations. The defined model is symbolically transformed to ODE form dx/dt = f(x,t). For example, equations might be analytically differentiated, ODE states selected, linear equation systems numerically solved when evaluating the transformed model. From the transformed model a Julia function is generated that is used to simulate the model with integrators from [DifferentialEquations](https://github.com/SciML/DifferentialEquations.jl). Simulation results can be plotted with [ModiaPlot](https://github.com/ModiaSim/ModiaPlot.jl), that provides a convenient interface to [GLMakie](https://github.com/JuliaPlots/GLMakie.jl) line plots.
12-
13-
Other packages from the Julia eco-systems that are specially supported:
14-
15-
- [Unitful](https://github.com/PainterQubits/Unitful.jl) to define and process physical units.
16-
- [Measurements](https://github.com/JuliaPhysics/Measurements.jl) to perform simulations with uncertain parameters and initial values with linear propagation theory.
17-
- [MonteCarloMeasurements](https://github.com/baggepinnen/MonteCarloMeasurements.jl) to perform simulations with uncertain parameters and initial values with particle theory.
13+
## Installation
1814

15+
The package is registered and is installed with (Julia >= 1.5 is required):
1916

20-
## Installation
17+
```julia
18+
julia> ]add Modia
19+
```
2120

22-
Modia and ModiaPlot are registered and are installed with (Julia >= 1.5 is required):
21+
Furthermore, one or more of the following packages should be installed in order
22+
to be able to generate plots:
2323

2424
```julia
25-
julia> ]add Modia, ModiaPlot
25+
julia> ]add ModiaPlot_PyPlot # if plotting with PyPlot desired
26+
add ModiaPlot_GLMakie # if plotting with GLMakie desired
27+
add ModiaPlot_WGLMakie # if plotting with WGLMakie desired
28+
add ModiaPlot_CairoMakie # if plotting with CairoMakie desired
2629
```
2730

2831
It is recommended to also add the following packages, in order that all tests and examples can be executed in your standard environment:
2932

3033
```julia
31-
julia> ]add Measurements
32-
add MonteCarloMeasurements
33-
add Distributions
34-
add Interpolations
34+
julia> ]add Unitful, DifferentialEquations, Measurements
35+
add MonteCarloMeasurements, Distributions
3536
```
3637

3738
## Examples
@@ -45,7 +46,9 @@ where *phi* is the rotation angle, *omega* the angular velocity, *m* the mass, *
4546
(note, you can define models also without units, or remove units before the model is processed):
4647

4748
```julia
48-
using Modia, ModiaPlot
49+
using Modia
50+
@usingModiaPlot # Use plot package defined with
51+
# ENV["MODIA_PLOT"] or Modia.usePlotPackage(..)
4952

5053
Pendulum = Model(
5154
L = 0.8u"m",

0 commit comments

Comments
 (0)