Skip to content

Commit 02b9d9c

Browse files
committed
Modia3D added to Modia
1 parent 6b2aa3d commit 02b9d9c

File tree

16 files changed

+550
-111
lines changed

16 files changed

+550
-111
lines changed

Manifest.toml

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@ git-tree-sha1 = "f53ca8d41e4753c41cdafa6ec5f7ce914b34be54"
7979
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
8080
version = "0.10.13"
8181

82+
[[ColorTypes]]
83+
deps = ["FixedPointNumbers", "Random"]
84+
git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597"
85+
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
86+
version = "0.11.0"
87+
88+
[[Colors]]
89+
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
90+
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
91+
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
92+
version = "0.12.8"
93+
8294
[[Combinatorics]]
8395
git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860"
8496
uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
@@ -183,9 +195,9 @@ version = "2.4.0"
183195

184196
[[DiffEqJump]]
185197
deps = ["ArrayInterface", "Compat", "DataStructures", "DiffEqBase", "FunctionWrappers", "LightGraphs", "LinearAlgebra", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "StaticArrays", "TreeViews", "UnPack"]
186-
git-tree-sha1 = "d2d9a628b9659a3107c95b0a61ca93865794245a"
198+
git-tree-sha1 = "51441835fed64ebc8ed52e43a9734bfb58d5ecd7"
187199
uuid = "c894b116-72e5-5b58-be3c-e6d8d4ac2b12"
188-
version = "6.15.1"
200+
version = "7.0.0"
189201

190202
[[DiffEqNoiseProcess]]
191203
deps = ["DiffEqBase", "Distributions", "LinearAlgebra", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "Requires", "ResettableStacks", "SciMLBase", "StaticArrays", "Statistics"]
@@ -213,9 +225,9 @@ version = "1.0.2"
213225

214226
[[DifferentialEquations]]
215227
deps = ["BoundaryValueDiffEq", "DelayDiffEq", "DiffEqBase", "DiffEqCallbacks", "DiffEqFinancial", "DiffEqJump", "DiffEqNoiseProcess", "DiffEqPhysics", "DimensionalPlotRecipes", "LinearAlgebra", "MultiScaleArrays", "OrdinaryDiffEq", "ParameterizedFunctions", "Random", "RecursiveArrayTools", "Reexport", "SteadyStateDiffEq", "StochasticDiffEq", "Sundials"]
216-
git-tree-sha1 = "3a72107d0ce1594a2ebbd3d46c7d0832802e215a"
228+
git-tree-sha1 = "ececc535bd2aa55a520131d955639288704e3851"
217229
uuid = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
218-
version = "6.17.2"
230+
version = "6.18.0"
219231

220232
[[DimensionalPlotRecipes]]
221233
deps = ["LinearAlgebra", "RecipesBase"]
@@ -290,17 +302,23 @@ uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a"
290302
version = "0.3.2"
291303

292304
[[FillArrays]]
293-
deps = ["LinearAlgebra", "Random", "SparseArrays"]
294-
git-tree-sha1 = "693210145367e7685d8604aee33d9bfb85db8b31"
305+
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
306+
git-tree-sha1 = "8c8eac2af06ce35973c3eadb4ab3243076a408e7"
295307
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
296-
version = "0.11.9"
308+
version = "0.12.1"
297309

298310
[[FiniteDiff]]
299311
deps = ["ArrayInterface", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays"]
300312
git-tree-sha1 = "8b3c09b56acaf3c0e581c66638b85c8650ee9dca"
301313
uuid = "6a86dc24-6348-571c-b903-95158fe2bd41"
302314
version = "2.8.1"
303315

316+
[[FixedPointNumbers]]
317+
deps = ["Statistics"]
318+
git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc"
319+
uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
320+
version = "0.8.4"
321+
304322
[[Formatting]]
305323
deps = ["Printf"]
306324
git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8"
@@ -452,9 +470,9 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
452470

453471
[[LoopVectorization]]
454472
deps = ["ArrayInterface", "DocStringExtensions", "IfElse", "LinearAlgebra", "OffsetArrays", "Polyester", "Requires", "SLEEFPirates", "Static", "StrideArraysCore", "ThreadingUtilities", "UnPack", "VectorizationBase"]
455-
git-tree-sha1 = "b844cb320457812f739fe75f216a481095daf5c2"
473+
git-tree-sha1 = "1578cc856a165170a9572602e885c8511d81da1e"
456474
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
457-
version = "0.12.55"
475+
version = "0.12.56"
458476

459477
[[MacroTools]]
460478
deps = ["Markdown", "Random"]
@@ -492,9 +510,15 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
492510

493511
[[ModelingToolkit]]
494512
deps = ["AbstractTrees", "ArrayInterface", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqJump", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "IfElse", "InteractiveUtils", "JuliaFormatter", "LabelledArrays", "Latexify", "Libdl", "LightGraphs", "LinearAlgebra", "MacroTools", "NaNMath", "NonlinearSolve", "RecursiveArrayTools", "Reexport", "Requires", "RuntimeGeneratedFunctions", "SafeTestsets", "SciMLBase", "Serialization", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicUtils", "Symbolics", "UnPack", "Unitful"]
495-
git-tree-sha1 = "2f4502f6bde7e02f4243e8f9c510aba648f7f840"
513+
git-tree-sha1 = "b6225318d687dbde588c6d0cd0b40161826763b1"
496514
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
497-
version = "5.25.1"
515+
version = "5.26.0"
516+
517+
[[Modia3D]]
518+
deps = ["Colors", "DataFrames", "JSON", "Libdl", "LinearAlgebra", "ModiaLang", "OrderedCollections", "Printf", "StaticArrays", "Test", "TimerOutputs", "UUIDs", "Unitful"]
519+
git-tree-sha1 = "95ce41a4eda16defb6bf181c89cbae11b79ae2d5"
520+
uuid = "07f2c1e0-90b0-56cf-bda7-b44b56e34eed"
521+
version = "0.5.0"
498522

499523
[[ModiaBase]]
500524
deps = ["DataFrames", "DiffRules", "LinearAlgebra", "Measurements", "MonteCarloMeasurements", "OrderedCollections", "TimerOutputs", "Unitful"]
@@ -504,9 +528,9 @@ version = "0.7.3"
504528

505529
[[ModiaLang]]
506530
deps = ["DataFrames", "DifferentialEquations", "FiniteDiff", "ForwardDiff", "InteractiveUtils", "JSON", "Measurements", "ModiaBase", "ModiaResult", "MonteCarloMeasurements", "OrderedCollections", "Reexport", "Sundials", "Test", "TimerOutputs", "Unitful"]
507-
git-tree-sha1 = "6ac374ec4dc0a470efeaa066c03c5ddad0267ee5"
531+
git-tree-sha1 = "74bd5394c6a77f635a6cbf5687c20855d26fcb0e"
508532
uuid = "34b37210-eaa3-4b48-8781-0b87bf559981"
509-
version = "0.8.0"
533+
version = "0.8.1"
510534

511535
[[ModiaResult]]
512536
deps = ["DataFrames", "DataStructures", "Measurements", "MonteCarloMeasurements", "Pkg", "Tables", "Unitful"]
@@ -590,9 +614,9 @@ version = "0.5.5+0"
590614

591615
[[Optim]]
592616
deps = ["Compat", "FillArrays", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"]
593-
git-tree-sha1 = "d34366a3abc25c41f88820762ef7dfdfe9306711"
617+
git-tree-sha1 = "3afbf5398ff3e51427ed620e5ffbe96c7fdba67c"
594618
uuid = "429524aa-4258-5aef-a3af-852621145aeb"
595-
version = "1.3.0"
619+
version = "1.4.0"
596620

597621
[[OrderedCollections]]
598622
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
@@ -695,9 +719,9 @@ version = "1.4.2"
695719

696720
[[RandomNumbers]]
697721
deps = ["Random", "Requires"]
698-
git-tree-sha1 = "441e6fc35597524ada7f85e13df1f4e10137d16f"
722+
git-tree-sha1 = "56ead4aaafc41d83694e17b0dd89d3e929d01a14"
699723
uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143"
700-
version = "1.4.0"
724+
version = "1.5.0"
701725

702726
[[RecipesBase]]
703727
git-tree-sha1 = "b3fb709f3c97bfc6e948be68beeecb55a0b340ae"
@@ -756,9 +780,9 @@ uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
756780

757781
[[SLEEFPirates]]
758782
deps = ["IfElse", "Static", "VectorizationBase"]
759-
git-tree-sha1 = "a8415a7a0e050cc927bf045665b8ed3376a6e368"
783+
git-tree-sha1 = "bfdf9532c33db35d2ce9df4828330f0e92344a52"
760784
uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa"
761-
version = "0.6.24"
785+
version = "0.6.25"
762786

763787
[[SafeTestsets]]
764788
deps = ["Test"]
@@ -857,9 +881,9 @@ version = "1.6.4"
857881

858882
[[StochasticDiffEq]]
859883
deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqJump", "DiffEqNoiseProcess", "DocStringExtensions", "FillArrays", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "Logging", "MuladdMacro", "NLsolve", "OrdinaryDiffEq", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SparseArrays", "SparseDiffTools", "StaticArrays", "UnPack"]
860-
git-tree-sha1 = "aee830c3b2c96d0e2e9fa40c5cae30d281db0dbd"
884+
git-tree-sha1 = "d9e996e95ad3c601c24d81245a7550cebcfedf85"
861885
uuid = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
862-
version = "6.35.0"
886+
version = "6.36.0"
863887

864888
[[StrideArraysCore]]
865889
deps = ["ArrayInterface", "ManualMemory", "Requires", "ThreadingUtilities", "VectorizationBase"]

Project.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ version = "0.5.0"
55

66
[deps]
77
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
8+
Modia3D = "07f2c1e0-90b0-56cf-bda7-b44b56e34eed"
89
ModiaLang = "34b37210-eaa3-4b48-8781-0b87bf559981"
10+
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
911
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1012
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1113
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
1214

1315
[compat]
14-
DifferentialEquations = "6.17, 6.16"
15-
ModiaLang = "0.8.0"
16+
DifferentialEquations = "6.18, 6.17, 6.16"
17+
Modia3D = "0.5"
18+
ModiaLang = "0.8"
19+
OrderedCollections = "1.4, 1.3, 1.2, 1.1"
1620
Reexport = "1.0, 0.2"
17-
Unitful = "1.6, 1.5, 1.4, 1.3"
21+
Unitful = "1"
1822
julia = "1.7, 1.6, 1.5"

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,27 @@
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](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).
8+
[Modia](https://github.com/ModiaSim/Modia.jl) is an 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** or by Julia structs/functions, such as the pre-defined Modia **3D-mechanical components**. 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).
99
The basic type of the floating point variables is usually `Float64`, but can be set to any
1010
type `FloatType<:AbstractFloat` via `@instantiateModel(..., FloatType = xxx)`, for example
1111
it can be set to `Float32, DoubleFloat, Measurement{Float64}, StaticParticles{Float64,100}`.
1212

13+
Modia includes a multibody program and 3D shapes for visualization and collision handling. It is then, for example, possible to model the 3D mechanical part of a robot with Modia multibody components and the electrical motors and gearboxes that are driving the joints with equation-based Modia components. Collision handling with elastic response calculation is performed for shapes that are defined with a contact material and have a convex geometry or are approximated by the convex hull of a concave geometry.
14+
The multibody program supports currently tree-structured multibody systems, but does not (yet) support kinematic loops.
15+
16+
Example videos: xxx
17+
1318
## Installation
1419

1520
The package is registered and is installed with (Julia >= 1.5 is required):
1621

1722
```julia
18-
julia> ]add Modia
23+
julia> ]add ModiaBase, ModiaLang, Modia
1924
```
2025

26+
Modia exports all exported symbols of [ModiaLang](https://github.com/ModiaSim/ModiaLang.jl), [DifferentialEquations](https://github.com/SciML/DifferentialEquations.jl) and of [Unitful](https://github.com/PainterQubits/Unitful.jl)
27+
and the essential exported symbols fo [Modia3D](https://github.com/ModiaSim/Modia3D.jl).
28+
2129
Furthermore, one or more of the following packages should be installed in order
2230
to be able to generate plots:
2331

@@ -97,11 +105,17 @@ and standard deviations as area around the mean values.
97105

98106
## Main Developers
99107

100-
- [Hilding Elmqvist](mailto:[email protected]), [Mogram](http://www.mogram.net/).
108+
### ModiaLang, ModiaBase
101109

110+
- [Hilding Elmqvist](mailto:[email protected]), [Mogram](http://www.mogram.net/).
102111
- [Martin Otter](https://rmc.dlr.de/sr/en/staff/martin.otter/),
103112
[DLR - Institute of System Dynamics and Control](https://www.dlr.de/sr/en).
113+
114+
### Modia3D
104115

105-
License: MIT (expat)
106-
116+
[Andrea Neumayr](mailto:[email protected]),
117+
[Martin Otter](https://rmc.dlr.de/sr/de/staff/martin.otter/) and
118+
[Gerhard Hippmann](mailto:[email protected]),\
119+
[DLR - Institute of System Dynamics and Control](https://www.dlr.de/sr/en)
107120

121+
License: [MIT (expat)](LICENSE)

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Documenter, Modia, ModiaLang, ModiaResult, ModiaPlot_PyPlot
1+
using Documenter, Modia, Modia.ModiaLang, Modia.ModiaLang.ModiaResult, ModiaPlot_PyPlot
22

33
makedocs(
44
#modules = [Modia],

0 commit comments

Comments
 (0)