Giter VIP home page Giter VIP logo

mbsim-env / mbsim Goto Github PK

View Code? Open in Web Editor NEW
42.0 16.0 16.0 57.42 MB

A multi-body simulation software

Home Page: https://www.mbsim-env.de

License: GNU Lesser General Public License v2.1

Makefile 0.75% C++ 75.90% MATLAB 0.01% Gnuplot 0.03% C 0.85% XSLT 0.08% Fortran 20.08% Shell 0.01% Python 0.30% M4 0.37% Pascal 0.01% TeX 0.17% SWIG 1.47% Batchfile 0.01%
multibody-dynamics c-plus-plus dynamic-analysis dynamical-systems simulation simulation-environment simulation-modeling gui-application

mbsim's Introduction

Dashboard

Current Daily Build Status of the MBSim-Environment

Build Type Variant Failed
linux64-dailydebug build image / image
linux64-dailydebug examples image / image
linux64-dailydebug coverage image
linux64-dailydebug examples-valgrind image / image
linux64-dailydebug coverage-valgrind image
linux64-dailyrelease build image / image
linux64-dailyrelease examples image / image
win64-dailyrelease build image / image
win64-dailyrelease examples image / image
- manuals image / image

Installation

This project provides a simulation environment for mechanical systems. It needs openmbvc++interface. After the installation proceed with the following steps.

  1. Checkout from git

If not already done, checkout the git tree git clone https://github.com/mbsim-env/mbsim.git

  1. Run AutoTools
aclocal
autoheader
libtoolize -c --force
autoconf
automake -a -c --force
  1. Proceed with configure

See file INSTALL.

mbsim's People

Contributors

foerg avatar friedrichatgc avatar tsschindler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mbsim's Issues

Piecewise linear function

Hello,
Is there a way to use a piecewise linear function for the generalized position constraint?
Im trying to get a varying angle for the rotation of a spinning Disk in an experiment for gyro effects.
Using the piecewise polynom function i have managed to get a varying angle but the problem is, that the curve of the angle has quite large overshoots.
I thought that i could make the stepsize smaller to reduce these overshoots but that would lead to much manual writing of the data.
Could it be a command for the interpolation method different from "cSplineNatural"?

Best regards Jantsche

Possible export of a MBSim model on an external hardware

Dear developers,

I would like to export the model to an external hardware to analyze the possbility to further accelerate the model execution. At the moment I am familiar with the FMU-export for Simulink, which works pretty well. However, it is not possible to use the FMU on an external hardware.
Therefore my question: would it be possible to export the model in any other format? My first trial would be to run the model on a GPU.

Thank you very much in advance
Best regards
Francesco Passigato

Casadi seems to be dependency but not in configure-process

What steps will reproduce the problem?
1. Build kernel without casadi-installation
2. configure works (doesn't find casadi however creates makefiles)
3. Compilation doesn't find "casadi/symbolic/fx/sx_function.hpp" in symbolic 
functions h.

What is the expected output? What do you see instead?

I would expect casadi to be a dependency of the kernel


Original issue reported on code.google.com by kgrundl on 3 Jun 2013 at 6:13

Enable MBSim Modules as plugins

Since now also to binary distribution of MBSim and co. is dynamically linked 
(even on Windows) the MBSim modules can be loaded as plugins (shared objects) 
at runtime. If so the MBSim Modules can initialize their ObjectFactory at 
runtime. This simplifies some parts of MBSim and MBSimXML. Moreover new modules 
can be included in mbsimxml without a required relink of mbsimflatxml!


Original issue reported on code.google.com by [email protected] on 8 Oct 2012 at 7:42

Function init process

MBSim Functions are now derived from Element to be able to call init(...) and 
initializeUsingXML(...) on these! Also getPath() is available with this change 
on Functions.

However this requires f->setParent(this) and f->init(stage) (and maybe 
f->setName(...)) to be called whenever a object containing a function f was 
created, initialized, ...

This is already done for most of the code except the following classes and/or 
files:
constitutive_laws.*
lcp_reformulation_functions.*
damping_functions.*
newton_method_jacobian_functions.*
criteria_functions.*
multi_dimensional_*_solver.*
nonlinear_algebra.*
piecewise_polynom_function.*
GeneralizedVelocityConstraint
GeneralizedAccelerationConstraint
Residuum
GeneralizedVelocityExcitation
GeneralizedAccelerationExcitation

Some of these classes are itself not derived from Element. This may be 
inconsistent or even incorrect and must be checked/fixed.

Original issue reported on code.google.com by [email protected] on 15 Nov 2014 at 7:54

Error with using FMU from mbsim in simulink

Hi,
I am trying to run some simulations in Simulink. I imported the model from mbsim with a FMU-Block. The FMU-file is generated via cmd and 'mbsimCreateFMU.exe' executed from a matlab script.
I want to investigate the effects of parameter changes and therefore I created a Matlab script, that does the following:

  1. load bus for Simulink and FMU
  2. for-loop that first changes parameters for mbsim and recreates the fmu-file, second the simulink model is executed

When starting the script from matlab, the first iteration of the loop is completed successfully. After the new fmu-file is created in the second iteration I always get the error:
" Error using Agility_Analysis (line 104)
Error parsing FMU 'mbsim.fmu'.
Caused by:
Error using Agility_Analysis (line 104)
Access denied. Check that you have permissions to access the
path. "
grafik

I checked if it helps to run Matlab as an administrator but it doesn't.

I would be very thankful if someone can help me out with this issue.

Memory increases with simulation time

What steps will reproduce the problem?
1. Run an example (e.g. mechanics_basics_2pendulums) with valgrind 
--tool=massif ./main
  1.1 once with plotting
  1.2 once without
2. look at the ms_print output for the written files
3. See a memory increase due to plotting routines

It seems that due to plotting more and more memory gets allocate without 
freeing it again. This is a problem especially for large simulations that crash 
because of "bad_malloc" after a while.

Original issue reported on code.google.com by kgrundl on 15 Mar 2012 at 2:01

Closed Groups in MBSimXML

Currently a Group may be changed to connect it to other elements.
E.g. if a Group contains a Frame and a Link and the other side of the Link 
should be connected to a Frame outside of the Group the setConnect(...) of the 
Link in the Group must be called which change the Group being not closed in 
this case.

Possible Solution:
Implement Proxy elements for (all) elements which acts as a interface for a 
Group to the outside.

Original issue reported on code.google.com by [email protected] on 9 Nov 2011 at 9:24

Using mbsim for tricycle dynamics

Hello, perhaps this is not the correct place to adress this question. If there is another place, please let me know.

I'm starting using mbsim software. It's an awesome piece of software and so it's very complex. I've studying the examples under examples/xml and I've made some progress.

Now I have a tricycle model, but to analyse specific stability problems I can not manage to configure the software.

For example, I would like to run a case in which the tricycle goes straight, then makes a constant radius turn (180º), and returns straight. This should be done with an almost constant velocity, and the model shall be stable.

I've defined the trajectory as a planar contour, and tried to establish a bilateral contact between one point in the tricycle and the trajectory. It does not work. I should also define the rotation of the direction following the curve, but I do not know how to make it.

I've experimented with kinetic excitations, imposing a moment in the steering, but when turning, if I make the moment null, then it goes inestable (no handling force acting).

If I could impose a time rotation between both parts then I would control the steering, but I have not been able to do it.

I've seen some very complex models in which sensors, signals, and controllers are used so the moment applied to the steering depends on the dynamics of the model, but I would prefer to skip all this complexity if possible.

I will send you my model to see if you can help me.

In any case, thanks for maintaining this amazing software, regards

modelo1.zip
.

Function[123]_* cleanup

The Function[123] interface in MBSim uses now also fixed size vector (e.g. 
Vec3) arguments. The XML interface and ObjectFactory should use 
Function[123]_VV3S for these (add the fixed size after the V). This is 
currently done only partial and inconsitently. Fix it.



Original issue reported on code.google.com by [email protected] on 26 Apr 2013 at 6:39

Port message handling to fmatvec::Atom

The fmatvec::Atom class provided now a general message handling functionallity. 
All MBSim code should be switched to this:

Details:
- Derive all MBSim classes from fmatvec::Atom (if not already done)
- Replace all occurence of std::cout<<... and std::cerr<<... by
  msg(Info)<<... or msg(Warn)<<...
- Maybe add more message types to fmatvec::Atom e.g. "Progress" for the
  time prints; "Warn2" for higher warning levels; ...
- But do not add a "Error" message type since errors should stop the
  simulation and hence throw MBSimError instead of printing messages
- Remove all DEBUGLEVEL, warnLevel, ... variables in MBSim and replace these
  by proper msgAct(<MessageLevel) calles.

Original issue reported on code.google.com by [email protected] on 21 Jun 2014 at 3:55

Heap-Allocation / Sub-Matrix Handling

In LinkMechanics every contour and/or frame of the link creates 
direction-matrices for the non-smooth projection (init()-->unknownStage). 
However, only a reference should be enough and is done anyways (e.g. 
updateWRef()). 
Right now a hack (due to empty matrices) seems to solve the problem of 
unnecessary heap-allocation but conceptually this might not be the clean way to 
do it...

Original issue reported on code.google.com by kgrundl on 20 May 2014 at 9:25

Check ThetaTimeSteppingIntegrator

What steps will reproduce the problem?
1. Run example "mechanics_contacts_point_nurbsdisk" with 
ThetaTimeSteppingIntegrator and compare to a run with TimeSteppingIntegrator

With ThetaTimeSteppingIntegrator:
The example crashes

With TimeSteppingIntegrator:
The example seems to be okay.


Please use labels and text to provide additional information.

Original issue reported on code.google.com by kgrundl on 12 Jan 2012 at 7:34

REMINDER: Does MBSim work without openmbvcpp-intreface?

What steps will reproduce the problem?
1. compiling mbsim without openmbvcppinterface

What is the expected output? What do you see instead?
mbsim should compile

This is just a reminder to check from time to time if mbsim works without the 
an installed openmbvcppinterfac...

Original issue reported on code.google.com by kgrundl on 24 Apr 2012 at 12:52

MBSimControl::Sensor may provide old values

MBSim has a "update on request" strategy:
e.g. explicitly call updateg(), updatezd(), ...

MBSimControl has as "update on demand" strategy:
if Signal::getSignal() is called the getSignal() function of all dependent 
signals are automatically called which updates all dependent signals 
automatically.

However all MBSimControl::Sensor's get their signal from MBSim elements:
e.g. MBSimControl::LinkDistanceSensor::getSingal() reads the distance from 
link->getg(). If the getSignal function is now triggered by another MBSim::Link 
it is not ensured that link->getg() is already updated by the corresponding 
MBSim::updateg() function because the evaluation order of Links is not define. 
Hence it may be possible that one gets the value for the last time step 
(without any notice). And using values form last time steps may cause 
instabillities.

What should/could we do here?!

Original issue reported on code.google.com by [email protected] on 15 Nov 2014 at 8:05

DASPK Integrator

DASPK integrator can't be used for some reasons:

1. Function names in Fortran code not unique. For this reason the whole 
integrator isn't compiled (see Makefile.am)

2. The integrator is implemented as an ode integrator. It may be implemented as 
a dae-integrator (see kernel version 0.1.3)

3. The integrator doesn't call system->update() during the integration. Only 
system->plot(), but not in every timestep.


Suggestion:
- The DASP integrator should be removed in this version
- A DAE integrator should be implemented. Maybe a Radau5DAE? In kernel version 
0.2.1 two DAE-Integrators where implemented (DASPK, Radau5DAE) from Robert 
Huber.


Original issue reported on code.google.com by [email protected] on 16 Feb 2012 at 7:55

C++/XML interface missmatch for Translation/Rotation

The C++ and the XML interface of Translation and Rotation (and derived classes) 
is inconsistent: In c++ a setAbc function should have a <abc> element in XML. 
This is wrong for e.g. <position>. Rework it in a consistent and clean way.

Original issue reported on code.google.com by [email protected] on 26 Apr 2013 at 6:42

Implement special Body's for performance reasons

Implement e.g. a RigidBody21 (as it exists in a early MBSim version) having 2 
translational and 1 rotations degree of freedom. Such Body's should be much 
faster than the general ones.

The should build the model with the existing Body's and during the 
initialization phase of MBSim these Body's should be checked and converted, if 
possible, to special ones.


Original issue reported on code.google.com by [email protected] on 9 Nov 2011 at 9:28

Creation of Matlab S-Function from MBSim

Good morning,

I am Francesco Passigato, research associate at the Chair of Automotive Technology at the TUM.
I developed a motorcycle mode with MBSim and I would like to export it in a Matlab-Simulink environment.
The idea is to get the model in the form of an input-output "block". Is that possible?

Thank you very much in advance
Best regards
Francesco Passigato

Postprocessing of non-state variables

- time integration stores states only
- run postprocessing after time integration for non-state variables
- allow also online-processing of non-state variables for online plotting and 
visualisiation

Original issue reported on code.google.com by [email protected] on 29 Nov 2011 at 8:11

Lemke algorithm files have booleans being compared to integers

Lemke's linear complementarity solution have booleans being compared to integers when setting the debug level. This issue the following errors when compiling with g++:

lemke_algorithm.cc: In member function ‘fmatvec::Vec MBSim::LemkeAlgorithm::solve(unsigned int): lemke_algorithm.cc:72:20: error: comparison of constant ‘3’ with boolean expression is always false [-Werror=bool-compare] if (DEBUGLEVEL >= 3) { ^ lemke_algorithm.cc:93:24: error: comparison of constant ‘3’ with boolean expression is always false [-Werror=bool-compare] if (DEBUGLEVEL >= 3) { ^ lemke_algorithm.cc:139:20: error: comparison of constant ‘2’ with boolean expression is always false [-Werror=bool-compare] if (DEBUGLEVEL >= 2) {

Stick to actio=reactio principle

For regularized contacts the actio=reactio principle is not fully fulfilled due 
to two contact points at different positions. A lever arm is active for 
tangential contacts.

Original issue reported on code.google.com by kgrundl on 11 Feb 2014 at 2:16

Replace mbsimxml.bat.in and mbsimxml.in

Replace the Windows batch file mbsimxml.bat.in
and the UNIX shell script mbsimxml.in by a binary executable.
This prevents double coding and writing ugly Windows batch files.

Original issue reported on code.google.com by [email protected] on 20 Nov 2011 at 10:07

Remove iteration of container for subsystems

Due to the flat hierarchy of the system, only the top level group (dynamic 
system solver) can comprise links. Iterations through subsystems can be omitted 
with respect to links.

Original issue reported on code.google.com by [email protected] on 15 Dec 2011 at 11:44

XML namespace <-> prefix mapping

Add a priority based mapping between XML namespaces and prefixes:
Each MBSim module should define a mapping between their namespace and a 
preferred prefix. Or better multiple prefixes with a priority.
This should be done using the ObjectFactory.

According to this information the writeXML function of MBSim should use proper 
prefixes including a proper namespace for the default (empty) prefix.
This will lead to more readable XML file generated by MBSim.

Original issue reported on code.google.com by [email protected] on 4 Oct 2012 at 12:39

Question about files in examples

Hi, I just discovered your software, it's amazing.

I would like to know what's the purpose of the files under mbsim/examples/xml and under the rest of mbsim/examples.

I have been able to open some of the XML ones (e.g. .mbsx) and I think that they define geometry and parameters for a simulation, but I don't understand what are all the others for (e.g. examples\mechanics\basics\slider_crank\*).

Thanks,
Manuel

nurbs-lib-prefix enhanced in configure.ac

In the configure.ac of the mbsimFlexibleBody-module the standard 
"nurbs-lib-prefix" is "$prefix/lib". To fit to new compilers also 
"$prefix/lib64" should be considered automatically?!

Original issue reported on code.google.com by kgrundl on 1 Oct 2012 at 3:28

Multiple dynamics after another and not simultaneously

Hello,
Ive been using MBSim to work on a semester project. One of the tasks is to give a short but efficient tutorial of the software.
For that i have decided to use a simulation of a bouncing ball on a declined plane in three variants. The first is only with a point on the ball to just get the jumping. The second is a circle that jumps on the plane and the third is a full ball contour. The last two ones are also set under friction.
Here I noticed that the ball initially bounces and only after the complete decay of these jumps the friction brings the ball to roll.
Realistically the ball should get a rotation as soon as the first contact occurs.
In another test, the ball was subjected to an initial rotation to the side and then dropped, but here, too, the bouncing subsides first, before a deflection to the side occurs.
Ive been quite stuck at this problem for a while. Maybe i did something wrong.

Inconsistent FrameLink::initializeUsingXML and FrameLink XML schema

FrameLink::initializeUsingXML reads a <mbsim:connect ref1=... ref2=.../> element but this element is not defined in the FrameLink XML schema, its defined in the SpringDamper XML schema. This is a bug.

This makes it currently impossible to derive from FrameLink in a MBSim module (other then kernel), because one cannot define a <mbsim:connect> element in a XML schema of a module (you can only defined elements is the namespace of the current schema but not in another namespace).

However, <mbsim:connect> is not the first element in SpringDamper. Hence, this element cannot be moved to FrameLink without breaking compatibility of XML input files. But since this is a bug we need to go this way and move it to FrameLink and fix all examples.

The same applies for the <enableOpenMBVForce> element in FrameLink/SpringDamper.

Failed Examples

The following examples are currently not running:

"example" ... "error in short"


electronics_dcdc_buck_converter ... "Assertion `i<m' failed"

xml_controlled_hydraulic_actuator ... "element HydraulicEnvironment: Schemas 
validity error : Element 
'{http://mbsim.berlios.de/MBSimHydraulics}HydraulicEnvironment': This element 
is not expected."

xml_chaintensioner ... "element HydraulicEnvironment: Schemas validity error : 
Element '{http://mbsim.berlios.de/MBSimHydraulics}HydraulicEnvironment': This 
element is not expected"

mechanics_initial_value_problem ... "error: cannot allocate an object of 
abstract type ‘initLink’"

mechanics_basics_simple_gear ... "void 
OpenMBV::CompoundRigidBody::addRigidBody(OpenMBV::RigidBody*): Assertion 
`rigidBody[i]->name!=rigidBody_->name' failed"

powertrain_planetary_gear ... "void 
OpenMBV::CompoundRigidBody::addRigidBody(OpenMBV::RigidBody*): Assertion 
`rigidBody[i]->name!=rigidBody_->name' failed"

xml_hydraulics_ballcheckvalve ... "element HydraulicEnvironment: Schemas 
validity error : Element 
'{http://mbsim.berlios.de/MBSimHydraulics}HydraulicEnvironment': This element 
is not expected."

mechanics_flexible_body_perlchain_cosserat ... "Speicherzugriffsfehler"

hydraulics_relative_hydraulic_proofofconcept ... "error: cannot allocate an 
object of abstract type ‘MBSim::Line’"

hydraulics_hydmec_trans ... "fatal error: mbsim/tree.h: Datei oder Verzeichnis 
nicht gefunden"

hydraulics_hydmec_rot ... "fatal error: mbsim/tree.h: Datei oder Verzeichnis 
nicht gefunden"


Original issue reported on code.google.com by [email protected] on 8 May 2012 at 11:07

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.