The online racing simulator
Pneumatic Simulation in VB.net
(5 posts, started )
Pneumatic Simulation in VB.net
I was up until 1AM last night working on this. It is a simulation that allows you to increase the mass of the load on a pneumatic cylinder. In the directory with the program, a CSV file will be created.

Here are some constants:
Gravity = 9.8m/s/s
Starting Pressure (P1)= 1MPa
Radius of cylinder = 0.25m

I wish to eventually simulate a compressor, tank, and the air lines. And I have to figure out how to make the cylinder go back down. To do that, I will have to calculate how fast the air can be vented into the atmosphere. Once I am happy with the physics, I will use 3dsmax to make a 2D representation, and just have pre-rendered gfx. Of course, I could use openGL but I don't care about gfx right now.

EDIT: Oh, and the label for pressure near the progress bar is wrong. It should read 100kPa (IIRC, I'm taking a break from programming for a few hours).

Attached files
Pneumatics_0_1.zip - 36.1 KB - 180 views
I dont really understand what you are on about, but if I try I see a bar with some numbers frantically changing value and a few buttons to Increase load and Decrease load. I pressed the buttons a few times and then it crashed. Some value became too big (should be between 0 and 100).

What is your approach to the simulation? What are the governing equations and assumptions?
Just to determine the position of a pneumatic ram? (As well as the pressure inside of it and the force it is pushing up, etc)

Quote :I pressed the buttons a few times and then it crashed. Some value became too big (should be between 0 and 100).

That would be one of the progress bars. Which probally means that you got the pneumatic cylinder extended past 1m.

Quote :if I try I see a bar with some numbers frantically changing value and a few buttons to Increase load and Decrease load.

Those numbers are the CSV data that is being copied. Why don't you open up log.csv in excel? Then you will be less confused. I didn't really give much documentation or anything. If you actually are interested in what I made, then I can make it better. The GUI is now what needs improving.
Attached images
pressureFormula.JPG
Unless I'm mistaken this is not actually LFS related? Moved to off-topic.

The simulation looks simple enough, if you want some useful feedback from the community then I'd suggesting outputting the data to a series of labels rather than one long text box. And use some rounding.

Drawing a little auto-scrolling graph showing displacement with time would be nice. If you don't care about it looking pretty you can do quite a bit just with block filled lines in VB (and I'm used to VB6, .NET may have more functionality in that department).

I'm really not sure if progress bars are the most suitable graphical representation for the data you're displaying.

I don't mean to be a bit disheartening, but you say you were up to 1am? When did you start, 11pm? That can't be more than 2 hours of work even if you're not familiar with the language, not including time to research equations, of course.
Quote from Bob Smith :I don't mean to be a bit disheartening, but you say you were up to 1am? When did you start, 11pm? That can't be more than 2 hours of work even if you're not familiar with the language, not including time to research equations, of course.

Well, I started around 8pm, took 2hrs wondering why it didn't work. I was using the wrong equations, but my dad gave me the correct equation. Then I took some breaks in between. I figure that programming is like driving a car, the only way you can get better is by just doing it. Your post has been helpful to me BTW.

And, I did not know that the Programming section was only for LFS programs. Oops!

Pneumatic Simulation in VB.net
(5 posts, started )
FGED GREDG RDFGDR GSFDG