I (beginner) am using dymola to model half rail vehicle dynamic system for vehicle and pitch motions.
The model has only wheels, bogies, car body and spring-damper connections without inputs and prismatic joints. I only need vertical motion of each body and pitch of the Carbody w.r.t time. Although last variation has no errors, system is going down. What should I do? And I have the vertical track irregularity file as function of distance. I would be very glad for any answers.
https://drive.google.com/file/d/0B8AmxzbhEQ_FaVFCOTlvcWNnWE0/view?usp=sharing
I think your best bet would be a library like this one:
https://github.com/dzimmer/PlanarMechanics
Related
I am making a game in Unity that involves creatures whose animations are determined by physics. For example, to move a limb of a creature, I can apply forces to the rigidbody it's associated with. I know how to apply forces programmatically through a script to create movements, but I'd like to create more complex and organic movements and thought that I might be able to use a neural network to do this.
I'd like each of the creatures to have a distinct way of moving in the world. I'd like to first puppeteer the creatures manually using my hand (with a Leap Motion controller), and have a neural network generate new movements based on the training I did with my hand.
More concretely, my manual puppeteering setup will apply forces to the rigidbodies of the creature as I move my hand. So if I lift my finger up, the system would apply a series of upward forces to the limb that is mapped to my finger. As I am puppeteering the creature, the NN receives Vector3 forces for each of the rigidbodies. In a way this is the same task as generating a new text based on a corpus of texts, but in this case my input is forces rather than strings.
Based on that training set, is it possible for the NN to generate movements for the characters (forces to be applied to the limbs) to mimic the movements I did with my hand?
I don't have that much experience with neural networks, but am eager to learn, specifically for this project. It would be great to know about similar projects that were done in Unity, or relevant libraries I could use that would simplify the implementation. Also, please let me know if there is anything I can clarify!
Not really an answer but would not fit for comments
I'm not sure the strategy you want to apply to train your model is the right one.
I would go for reinforcement learning methods (you can check this question for more infos about it) using, for example, the distance traveled by the center of mass of the creature on the x-axis as a fitness. If this leads to weird behaviours (like this well known robot) you could, for example, think of strategies like penalizing your individuals given the distance traveled on y and z axis (still by the CoM) to try having guys that keep there CoM on the same plane.
Without knowing exactly what you want to achieve this is hard to give you more advices. Although, if you are not looking only for neural network based techniques, there is this really great paper you might want to have a look at (here is the video of their results).
So I am looking for some general advice. For my final project in my Computational Physics class. I have to complete the following problem.
(4.16 from Computation Physics 2nd Edition By Giordano and Nakanishi)
-Carry out a true three-body simulation in which the motions of Earth, Jupiter, and the Sun are all calculated. Since all three bodies are now in motion, it is useful to take the center of mass of the three-body system as the origin, rather than the position of Sun. We also suggest that you give Sun and initial velocity which makes the total momentum of the system exactly zero(so that the center of mass will remain fixed). Study the motion of Earth with different initial conditions. Also, try increasing the mass of Jupiter to 10, 100, and 1000 times its true mass.
My question: Is it possible to write the code for the problem above, and then import that code(or the result) into Adobe After Effects to model the three-body simulation? My teacher has expressed that if i am able to do so, he would be inclined to give me extra credit, which i desperately need.
It is possible to do some scripting in After Effects, but the language is Javascript (or rather, ExtendScript), not Matlab. I would do everything in a javascript: first calculate your solution (3 streams of position data), and use these to keyframe the corresponding layers in After Effects. You will have to learn a bit of the After Effects object model, but in that case you wont need much: the Layer object and how to keyframe its position property. You should go to the Adobe After Effects scripting forum https://forums.adobe.com/community/aftereffects_general_discussion/ae_scripting/ for some script examples.
I have made a basic "quarter-car" simulink model. It is a double mass system with two springs and two dampers. However I want to add speed of the car as a parameter to this model and I do not know how. Block "Step" is the bump size as an input from the road. Screenshot of the model
Thanks
Your quarter car model is in the vertical dimension only. You wish to add the speed of the vehicle which will then add another dimension to your model. This will require some thought. How do you wish to model the input to the model once the horizontal dimension is developed? I would recommend trying something simple like modifying the "Step" block(which I can't seem to find in your model) to create a larger disturbance at high speeds. Then you can build from there, add profiles to describe road artifacts, etc.
I want to simulate fire using SPH particles. I understand the concept behind SPH but don't understand yet how to model the fire as a fluid.
Do I have to add some temperature property to my particles from which I can derive there color?
Do I have to take the surrounding air particles in account to create some buoyancy effect?
Where do the particles get their heat from? Do I have to add a heat emitter over some space which creates warm particles so that the temperature then diffuses to the other particles over time?
Are there some tutorials which describe my problem?
Yes, you'll have to have a temperature property. It really isn't fire if temperature isn't involved. And once you have temperature it's easy to get luminosity and color. (You probably don't have to worry about radiative heat transfer, at least not for a first effort.)
If you handle pressure and gravity right, buoyancy will arise (ahem) naturally.
You can start with a fixed heating element and an inert gas, then when you're ready you can introduce combustion as a differential equation: the rate of energy generation is a function of temperature, fuel pressure and oxygen pressure.
I think it would be fun to model a top view of a train following a track, traversing switches and so on, using a physics library like Box2D. What joints and motors would I need to make this work?
I'm curious about how to implement the forces needed to make the car follow a spline track so it can bump into other train cars, pedestrians, DeLoreans etc. Just saying "the car is now at spline(t)" for each time step would create excessive forces in the physics engine. If I understand correctly, you have to stick the car onto the track with one force, constrain its angle to tend towards parallel with the track with another (or stick the front and back of the car to the track with two forces), and create another force to propel the train forward. I'm looking for some details on how to accomplish these things.
I believe it would be easier without "real" physics, like the ball movement of games such as Luxor or Tumble Bugs. Meaning: let the train follow a spline which is defined by the tracks.
Using phyiscs is probably overkill to make a train follow a track and could lead to all kinds of undesired side-effects, including jerky motion, train derailing, train getting stuck on junctions, etc.
You could still join the individual wagons together using physic joints, however. Just make sure that only the locomotive gets acceleration forces, the rest of the train just follows or is pushed but stays on the spline.
Why are you worried about keeping it "on the tracks"? Where is it going to go? Gravity should keep it down, object intersection should keep it up, and so the only directions you need to worry about are forward and backwards. That's where a motor comes in, and you're done. The rest is decorations.
In response to edit of problem:
Siderails. And have the train long enough / rigid enough compared to its width that you can navigate crossings (make them closer to right angles to minimize the crossing problems.
A top-down view (i.e. seeing the train from the sky) doesn't really require a 2d physics engine - if I understand you correctly. In fact, it seems like it wouldn't really help with the problem (if you want a train simulation), but then maybe you just wanna try it out for fun. :)
However, what about putting something like a slider joint on the train and the cars, and a motor on the locomotive. The slider joint might need some special implementation; you probably want to run the train along a spline and not a segment of straight lines, right?
Some sort of ball joint would connect the cars together.
The implementation is not so toughand I was able to prototype something in a few hours that does the basic job. It will require a lot of work to make it run smoothly, but it's essentially just "siderails."
Being top-down you obviously first must turn off gravity in Box2D. Second, build a train. Treat train wheels like car wheels and it'll suddenly get a lot more simple. For tracks you have a few choices:
Create your own game object (not in the box2D world) that is a simple line the train will then "follow" (you can use motors on train wheels to "steer" towards the line). Then just overlay the line with some nice wide "rail" graphics and you have a nicely faked system. Tell the wheels to turn off if it strays too far from the line and presto, you have a derailment.
Create actual physical rails - outside rails (like siderails) that the trains "wheels" will bump into. They will have to have gentle curves in this instance, which could be very difficult given the limited resources you have (simulating a nice slow curve out of boxes in Box2D is rough on the processor)
Then just let your train go!