Skip to content

Commit 2d6d5f8

Browse files
committed
- Version number changed to 0.9.0 + rotation123 changed to rotationXYZ + release notes finalized
1 parent 3436154 commit 2d6d5f8

File tree

12 files changed

+107
-60
lines changed

12 files changed

+107
-60
lines changed

Manifest.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
154154

155155
[[deps.ConstructionBase]]
156156
deps = ["LinearAlgebra"]
157-
git-tree-sha1 = "c096d0e321368ac23eb1be1ea405814f8b32adb3"
157+
git-tree-sha1 = "59d00b3139a9de4eb961057eabb65ac6522be954"
158158
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
159-
version = "1.3.1"
159+
version = "1.4.0"
160160

161161
[[deps.CpuId]]
162162
deps = ["Markdown"]
@@ -213,9 +213,9 @@ version = "0.4.0"
213213

214214
[[deps.DiffEqBase]]
215215
deps = ["ArrayInterfaceCore", "ChainRulesCore", "DataStructures", "Distributions", "DocStringExtensions", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "LinearAlgebra", "Logging", "MuladdMacro", "NonlinearSolve", "Parameters", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "Setfield", "SparseArrays", "StaticArrays", "Statistics", "ZygoteRules"]
216-
git-tree-sha1 = "9862c61c6049b0ad5a6b433e31d2c6c8ff373056"
216+
git-tree-sha1 = "f7a479aac5f3917b8472ac5f1b77d6f296fe58f1"
217217
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"
218-
version = "6.92.2"
218+
version = "6.92.3"
219219

220220
[[deps.DiffEqCallbacks]]
221221
deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "LinearAlgebra", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArrays"]
@@ -602,28 +602,22 @@ version = "1.0.2"
602602
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
603603

604604
[[deps.Modia]]
605-
deps = ["DataFrames", "DifferentialEquations", "FiniteDiff", "ForwardDiff", "InteractiveUtils", "JSON", "LinearAlgebra", "Measurements", "ModiaBase", "ModiaResult", "MonteCarloMeasurements", "OrderedCollections", "Printf", "RecursiveFactorization", "Reexport", "StaticArrays", "Sundials", "Test", "TimerOutputs", "Unitful"]
606-
git-tree-sha1 = "28acd8404dcef5e884f987795093898df45e33a1"
605+
deps = ["DataFrames", "DiffEqBase", "DifferentialEquations", "FiniteDiff", "ForwardDiff", "InteractiveUtils", "JSON", "LinearAlgebra", "Measurements", "ModiaBase", "MonteCarloMeasurements", "OrderedCollections", "Printf", "RecursiveFactorization", "Reexport", "SignalTables", "StaticArrays", "Sundials", "Test", "TimerOutputs", "Unitful"]
606+
git-tree-sha1 = "6b9fd66ea84883eb9a03666fc3bdb360d4b86d32"
607607
uuid = "cb905087-75eb-5f27-8515-1ce0ec8e839e"
608-
version = "0.8.3"
608+
version = "0.9.0"
609609

610610
[[deps.ModiaBase]]
611611
deps = ["DataFrames", "DiffRules", "Measurements", "MonteCarloMeasurements", "OrderedCollections", "StaticArrays", "Unitful"]
612612
git-tree-sha1 = "57f347bcda8e96732d3f0c2e3a162383fedbeeff"
613613
uuid = "ec7bf1ca-419d-4510-bbab-199861c55244"
614614
version = "0.11.0"
615615

616-
[[deps.ModiaResult]]
617-
deps = ["DataFrames", "Measurements", "MonteCarloMeasurements", "OrderedCollections", "Pkg", "Tables", "Unitful"]
618-
git-tree-sha1 = "02324a82efdb489c16bb6d008131a1447b125ad5"
619-
uuid = "16a87621-1533-42f6-8e19-4a825980cec2"
620-
version = "0.4.3"
621-
622616
[[deps.MonteCarloMeasurements]]
623617
deps = ["Distributed", "Distributions", "LinearAlgebra", "MacroTools", "Random", "RecipesBase", "Requires", "SLEEFPirates", "StaticArrays", "Statistics", "StatsBase", "Test"]
624-
git-tree-sha1 = "03619e255664666b352a5e5f6b45e8b00d439870"
618+
git-tree-sha1 = "a7e89fde6ff10000e1a8f4d697b978d3908e913a"
625619
uuid = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
626-
version = "1.0.8"
620+
version = "1.0.9"
627621

628622
[[deps.MozillaCACerts_jll]]
629623
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
@@ -899,6 +893,12 @@ version = "1.0.0"
899893
deps = ["Distributed", "Mmap", "Random", "Serialization"]
900894
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
901895

896+
[[deps.SignalTables]]
897+
deps = ["DataFrames", "JSON", "OrderedCollections", "Pkg", "Tables", "Test", "Unitful"]
898+
git-tree-sha1 = "cc3aa097670199d3eb1424d69b393844a916edc8"
899+
uuid = "3201582d-3078-4276-ba5d-0a1254d79d7c"
900+
version = "0.3.4"
901+
902902
[[deps.SimpleTraits]]
903903
deps = ["InteractiveUtils", "MacroTools"]
904904
git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231"
@@ -926,9 +926,9 @@ version = "1.24.0"
926926

927927
[[deps.SpecialFunctions]]
928928
deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"]
929-
git-tree-sha1 = "a9e798cae4867e3a41cae2dd9eb60c047f1212db"
929+
git-tree-sha1 = "d75bda01f8c31ebb72df80a46c88b25d1c79c56d"
930930
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
931-
version = "2.1.6"
931+
version = "2.1.7"
932932

933933
[[deps.Static]]
934934
deps = ["IfElse"]
@@ -1092,9 +1092,9 @@ version = "1.11.0"
10921092

10931093
[[deps.VectorizationBase]]
10941094
deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static"]
1095-
git-tree-sha1 = "9d87c8c1d27dc20ba8be6bdca85d36556c371172"
1095+
git-tree-sha1 = "39e55018bccc5a858217db32aa3d9e7decbefd0c"
10961096
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
1097-
version = "0.21.38"
1097+
version = "0.21.40"
10981098

10991099
[[deps.VertexSafeGraphs]]
11001100
deps = ["Graphs"]

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
authors = ["Andrea Neumayr <[email protected]>", "Martin Otter <[email protected]>", "Gerhard Hippmann <[email protected]>"]
22
name = "Modia3D"
33
uuid = "07f2c1e0-90b0-56cf-bda7-b44b56e34eed"
4-
version = "0.11.0-dev"
4+
version = "0.11.0"
55

66
[compat]
77
Colors = "0.12, 0.11, 0.10"
@@ -12,7 +12,7 @@ HTTP = "0.9"
1212
JSON = "0.21"
1313
Measurements = "2"
1414
MeshIO = "0.4.10"
15-
Modia = "0.8.3, 0.9.0"
15+
Modia = "0.9.0"
1616
MonteCarloMeasurements = "1"
1717
OrderedCollections = "1"
1818
Reexport = "1.0"

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Note, Modia3D reexports the following definitions
2929
- `using Modia`
3030
- `using Unitful`
3131
- `using DifferentialEquations`
32+
- `using SignalTables`
3233
- and exports functions `CVODE_BDF` and `IDA` of [Sundials.jl](https://github.com/SciML/Sundials.jl).
3334

3435
As a result, it is usually sufficient to have `using Modia3D` in a model to utilize the relevant
@@ -57,7 +58,8 @@ Modia3D has various *3D animation features*:
5758

5859
## Faster Startup
5960

60-
In order to speed up startup, it is adviced to generate a sysimage by executing the following commands:
61+
In order to speed up startup, a sysimage can be generated by executing the following commands
62+
(may take several minutes):
6163

6264
```julia
6365
julia
@@ -66,7 +68,7 @@ include("$(Modia3D.path)/create_Modia3D_sysimage.jl")
6668
exit()
6769
```
6870

69-
This will include a file `Modia3D_sysimage.dll` (on Windows) or `Modia3D_sysimage.so` (otherwise) in your
71+
This will generate a file `Modia3D_sysimage.dll` (on Windows) or `Modia3D_sysimage.so` (otherwise) in your
7072
current working directory that includes all packages of your current project and the following packages
7173
(these packages are added to your current project, if not yet included):
7274

@@ -79,6 +81,10 @@ julia -JModia3D_sysimage.dll (on Windows)
7981
julia -JModia3D_sysimage.so (otherwise)
8082
```
8183

84+
The benefit is that `using Modia3D` is nearly immediatedly executed (instead of > 30 seconds).
85+
The drawback is that `create_Modia3D_sysimage.jl` has to be newly executed, whenever
86+
new package versions are used in your environment.
87+
8288
## Main Developers and License
8389

8490
[Andrea Neumayr](mailto:[email protected]),

docs/src/index.md

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This will include a file `Modia3D_sysimage.dll` (on Windows) or `Modia3D_sysimag
6767
current working directory that includes all packages of your current project and the following packages
6868
(these packages are added to your current project, if not yet included):
6969

70-
- Modia, Modia3D, ModiaPlot_PyPlot, PackageCompiler, Revise
70+
- Modia, Modia3D, SignalTablesInterface_PyPlot, PackageCompiler, Revise
7171

7272
Start julia with this sysimage in the following way:
7373

@@ -94,31 +94,72 @@ julia -JModia3D_sysimage.so (otherwise)
9494
## Release Notes
9595

9696

97-
### Version 0.11.0-dev
97+
### Version 0.11.0
9898

9999
- Requires Modia 0.9.0 or later.
100100

101-
- Additional keyword arguments of Object3D: `Object3D(..., fixedInParent=true, velocity=[0.0, 0.0, 0.0], angularVelocity=[0.0, 0.0, 0.0])`.
102-
A freely moving Object3D is defined with `Object3D(..., fixedInParent=false, ...)`. The states and other code for such Object3Ds are
103-
no longer visible in the generated code (so compilation is faster).
101+
- Additional keyword arguments of Object3D: `Object3D(..., fixedInParent=true, velocity=[0.0, 0.0, 0.0], angularVelocity=[0.0, 0.0, 0.0])`,
102+
besides the existing `parent, translation, rotation, feature`. A freely moving Object3D is defined with
103+
`Object3D(..., fixedInParent=false, ...)`, where `velocity=.., angularVelocity=..`
104+
are the initial conditions (resolved in the parent frame). The states and other code for such Object3Ds are
105+
*not* part of the generated code (so compilation is faster, and the objects can be changed after code generation).\
106+
If `fixedToParent=false`, vectors `translation, rotation, velocity, angularVelocity` (all resolved in `parent`)
107+
are used as states and are available in the result for plotting.
108+
`rotation` is vector `[angleX, angleY, angleZ]` to rotate the parent coordinate system
109+
along the x-axis with `angleX`, the y-axis with `angleY` and the z-axis with `angleZ` to arrive at the Object3D
110+
coordinate system. If `rotation[2]` is close to its singular position (= 90u"°" or -90u"°"),
111+
an event is triggered and the rotation sequence is changed from `[angleX, angleY, angleZ]` to `[angleX, angleZ, angleY]`.
112+
In the new rotation sequence, `rotation[2]` is far from its singular position at this time instant.
113+
Variable `rotationXYZ::Bool` in the result signals whether rotation is defined with rotation
114+
sequence `[angleX, angleY, angleZ]` (`rotationXYZ=true`) or with rotation sequence
115+
`[angleX, angleZ, angleY]` (`rotationXYZ=false`). See, example `Modia3D/test/Basic/ShaftFreeMotionAdaptiveRotSequence.jl`.
116+
Note, the initial conditions (so `rotation=...` as key/value pair in the Object3D constructor)
117+
are always with `rotationXYZ=true`.\
118+
With respect to an approach where the rotation is described with *quaternions*, the
119+
adaptive rotation sequence handling has the benefits, that (1) all integrators can be used
120+
(a quaternion description works with an overdetermined set of states and therefore standard
121+
integrators with step size control need code changes) and that (2) integrators with step size control can usually
122+
perform larger steps.
123+
124+
- The `FreeMotion` joints in all test models have been removed and replaced by Object3Ds with `fixedInParent=false`.
125+
A new test model test/Basic/FreeShaftAdaptiveRotSequenceWithFreeMotion.jl has been introduced with a `FreeMotion`
126+
joint, to still have one test for a `FreeMotion` joint.
104127

105128
- `Revolute(..)` and `Prismatic(..)` joints can define axis of rotation/translation optionally as vector, e.g., `axis = [1.0, 2.0, 3.0]`.
106129

107-
- New variants of functions: `Modia3D.rot1(angle,v), Modia3D.rot2(angle,v), Modia3D.rot3(angle,v), Modia3D.resolve1(rotation,v2), Modia3D.resolve2(rotation,v1)`.
130+
- New function `Modia3D.rot1(angle,v)` which is an efficient implementation of `Modia3D.rot1(angle)*v` where `rot1(angle)` returns
131+
a transformation matrix and `v` is a vector and `rot1(angle,v)` returns the product of the transformation matrix and a vector
132+
in an efficient way. Correspondingly, there are new functions
133+
`Modia3D.rot2(angle,v), Modia3D.rot3(angle,v), Modia3D.resolve1(rotation,v2), Modia3D.resolve2(rotation,v1)`.
134+
135+
- Simulation speed improved, if contact of FileMesh objects.
136+
137+
- contactPairMaterials.json updated with more material pairs (e.g. results in less warning messages for runtests).
138+
139+
- New file `Modia3D.create_Modia3D_sysimage.jl` to create a *sysimage*. Using this sysimage has the
140+
advantage that `using Modia3D` is nearly immediatedly executed (instead of > 30 seconds).
141+
For details, see README.md file.
142+
143+
- Internal: Timer included in Scene (scene.timer), so that a timer is more easily accessible for debugging.
144+
145+
- Internal: Cleanup and improvements of Modia3D/src/Frames.jl
146+
108147

109148
**Deprecated**
110149

111150
- Joint `FreeMotion` is **deprecated**. Use instead `Object3D(..., fixedInParent=false, ...)`.
112-
Note, Object3D has variables `translation, rotation, velocity, angularVelocity` instead of `r, rot, v, w` of `FreeMotion`.
151+
Note, Object3D has variables `translation, rotation, velocity, angularVelocity, rotationXYZ` instead of
152+
`r, rot, v, w, isrot123` of `FreeMotion`.
113153
Furthermore, `angularVelocity` is resolved in the parent `Object3D` whereas `w` in `FreeMotion(obj1=.., obj2=..., ..)` is resolved in
114154
`obj2` and not in `obj1`. This means in particular that the init/start value `FreeMotion(.., w=Var(start=w_start)...)` needs
115-
to be transformed in Object3D with `Object3D(..., fixedInParent=false, rotation=XXX, angularVelocity = Modia3D.resolve1(XXX,w_start))`.
116-
As a side effect,
155+
to be transformed in Object3D with `Object3D(..., fixedInParent=false, rotation=XXX, angularVelocity = Modia3D.resolve1(XXX,w_start))`
156+
and the results of `angularVelocity` will be different to `w` because resolved in different coordinate systems.
117157

118158
**Non-backwards compatible changes**
119159

120160
- Since Modia3D 0.11.0 is based on Modia 0.9.0, the non-backwards compatible changes of Modia have also an effect on Modia3D
121-
(for details, see the release notes of Modia 0.9.0). Typically, this should give problems only in seldomly occuring corner cases.
161+
(for details, see the [release notes of Modia 0.9.0](https://github.com/ModiaSim/Modia.jl/releases/tag/v0.9.0)).
162+
Typically, this should give problems only in seldomly occuring corner cases.
122163

123164

124165
### Version 0.10.4

src/Composition/joints/joints.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ mutable struct MultibodyData{F <: Modia3D.VarFloatType, TimeType}
8989

9090
# Define hidden model states and copy initial values into eqInfo
9191
path = obj.path * "."
92-
w_init = freeMotion.wResolvedInParent ? Modia3D.resolve1(freeMotion.rot, freeMotion.w, rotation123=freeMotion.isrot123) : freeMotion.w
92+
w_init = freeMotion.wResolvedInParent ? Modia3D.resolve1(freeMotion.rot, freeMotion.w, rotationXYZ=freeMotion.isrot123) : freeMotion.w
9393
freeMotion.ix_segmented_r = Modia.new_x_segmented_variable!(partiallyInstantiatedModel, path*"translation" , path*"der(translation)" , freeMotion.r)
9494
freeMotion.ix_segmented_v = Modia.new_x_segmented_variable!(partiallyInstantiatedModel, path*"velocity" , path*"der(velocity)" , freeMotion.v)
9595
freeMotion.ix_segmented_rot = Modia.new_x_segmented_variable!(partiallyInstantiatedModel, path*"rotation" , path*"der(rotation)" , freeMotion.rot)
9696
freeMotion.ix_segmented_w = Modia.new_x_segmented_variable!(partiallyInstantiatedModel, path*"angularVelocity", path*"der(angularVelocity)", w_init)
97-
freeMotion.iextra_isrot123 = Modia.new_w_segmented_variable!(partiallyInstantiatedModel, path*"rotation123", freeMotion.isrot123)
97+
freeMotion.iextra_isrot123 = Modia.new_w_segmented_variable!(partiallyInstantiatedModel, path*"rotationXYZ", freeMotion.isrot123)
9898
freeMotion.ix_rot = Modia.get_x_startIndex_from_x_segmented_startIndex(partiallyInstantiatedModel,freeMotion.ix_segmented_rot)
9999

100100
# Define event indicator to monitor changing sequence of rotation angles
@@ -667,7 +667,7 @@ function change_rotSequence!(m::Modia.SimulationModel, freeMotion::FreeMotion, x
667667
@assert(rotation2ZeroCrossing <= 0)
668668

669669
if m.options.logEvents
670-
println(" ", freeMotion.path * ".rotation123 changed to ", freeMotion.isrot123)
670+
println(" ", freeMotion.path * ".rotationXYZ changed to ", freeMotion.isrot123)
671671
println(" ", freeMotion.path * ".rotation changed to ", freeMotion.rot)
672672
println(" ", freeMotion.str_rot2 * " (= ", rotation2ZeroCrossing, ", ) became <= 0")
673673
end
@@ -697,7 +697,7 @@ function setStatesHiddenJoints!(m::Modia.SimulationModel{F,TimeType}, mbs::Multi
697697
j3 = freeMotion.ix_segmented_v ; freeMotion.v = SVector{3,F}(x_segmented[j3], x_segmented[j3+1], x_segmented[j3+2])
698698
j4 = freeMotion.ix_segmented_w ; freeMotion.w = SVector{3,F}(x_segmented[j4], x_segmented[j4+1], x_segmented[j4+2])
699699
if freeMotion.wResolvedInParent
700-
freeMotion.w = Modia3D.resolve2(freeMotion.rot, freeMotion.w, rotation123 = freeMotion.isrot123)
700+
freeMotion.w = Modia3D.resolve2(freeMotion.rot, freeMotion.w, rotationXYZ = freeMotion.isrot123)
701701
end
702702

703703
# der(r) = v

src/Composition/joints/object3DMotion.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ mutable struct FreeMotion{F <: Modia3D.VarFloatType} <: Modia3D.AbstractJoint
134134
w = Modia3D.convertAndStripUnit(SVector{3,F}, u"rad/s", w)
135135
if wResolvedInParent
136136
# Transform w from obj1 to obj2
137-
w = Modia3D.resolve2(rot, w, rotation123=isrot123)
137+
w = Modia3D.resolve2(rot, w, rotationXYZ=isrot123)
138138
end
139139
a = Modia3D.ZeroVector3D(F)
140140
z = Modia3D.ZeroVector3D(F)

src/Composition/object3D.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ If `fixedToParent=false`, the Object3D is moving freely relatively to `parent`.
7979
Vectors `translation`, `rotation`, `velocity`, `angularVelocity` (all resolved in `parent`) are used as states and are available in the result for plotting.
8080
8181
If `rotation[2]` is close to its singular position (= 90u"°" or -90u"°"), an event is triggered and the rotation sequence is changed from `[angleX, angleY, angleZ]` to
82-
`[angleX, angleZ, angleY]`. In the new rotation sequence, `rotation[2]` is far from its singular position at this time instant. Variable `rotation123::Bool` in the result
83-
signals whether `rotation` is defined with rotation sequence `[angleX, angleY, angleZ]` (`rotation123=true`) or with rotation sequence `[angleX, angleZ, angleY]` (`rotation123=false`).
82+
`[angleX, angleZ, angleY]`. In the new rotation sequence, `rotation[2]` is far from its singular position at this time instant. Variable `rotationXYZ::Bool` in the result
83+
signals whether `rotation` is defined with rotation sequence `[angleX, angleY, angleZ]` (`rotationXYZ=true`) or with rotation sequence `[angleX, angleZ, angleY]` (`rotationXYZ=false`).
8484
See, example `Modia3D/test/Basic/ShaftFreeMotionAdaptiveRotSequence.jl`.
8585
8686

0 commit comments

Comments
 (0)