2D PJ Pressure analizer

Moderator: Mike Everman

zono
Posts: 78
Joined: Wed May 28, 2008 1:03 pm

Re: 2D PJ Pressure analizer

Post by zono » Thu Sep 30, 2010 8:46 pm

Robinson and Steve,

it is a good idea to enhance the values dimension from 255 to higher values in the color map. What do you think about using some kind of logarithms? Say, you take color values from -128 to +128 , that represent 2^-128 to 2^+128 or 2^-12.8 to 2^+12.8 ?

Coanda effect works? Fine ! It shows correct function of sticky boundary conditions.

Robinson:

what nickname do you use in sourceforge? I would like to have a look on your other developments.

....and a small hint for your paint models: use more fill area for high pressure zones. so you get the fundamental frequency of the pipe, not only the harmonics ;-)

I am looking forward to your version 0.02 !!! Good work !

zono
Attachments
escopeta.jpg
escopeta.jpg (7.4 KiB) Viewed 12989 times
___________________________
zono - the thruster buster
--------------------------------------

Suns
Posts: 23
Joined: Sun Sep 19, 2010 2:55 pm
Antipspambot question: 125

Re: 2D PJ Pressure analizer

Post by Suns » Fri Oct 08, 2010 1:12 pm

Zono,

I started to do that, fill the engine interior completely. (it is nice to create jam jar animations)

I will post the version 0.02 here, but i stop working on it. (if you are not updating with the previous version please create a subdirectory called "\anim", this version doesn't have the bat and ffmpeg to create videos from the simulation)
2D-FlowSim-002.zip
More options
(9.03 KiB) Downloaded 514 times
It have more options in the config file.

"ivx=10; //if ivx=0 cancel flow simulation (create vertical speed on the left and right side)"
is horizontal speed not vertical

I started the engine from scratch. i will use only one loop for each step of simulation using a image swap technique on the principal struct of data. (speed up)

And I get the equations from the start and develop keeping the units and each constant as is. So, 003 will have somewhat correct simulation data.
will have pixel area in m².

I´m putting temperature i have the temperature propagation with the flow, but not all the effects the temperature cause to the mass of gas i think.

the output i will release as the 0.02 version in gray and color as option.
as future i will put something like plasma pong colors and a logarithm output, and CVS (for third party tools/front-ends)
More initial and constant conditions. (pressure points and pressure lines, pulsed points)
And some output information points with internal data on a point, temperature, number of mols, pressure, vertical and horizontal speeds, moment (to use on gnuplot or similar).

I find a interesting game "The Powder Toy" it have a interesting physics simulation engine, and a nice way of using colors i think.
Maybe able to create a pulsejet on this, hehehe http://powdertoy.co.uk/


Suns

zono
Posts: 78
Joined: Wed May 28, 2008 1:03 pm

Re: 2D PJ Pressure analizer

Post by zono » Sat Oct 09, 2010 2:32 pm

great, Robinson !

i will test v.002 tomorrow. I am thrilled

zono
___________________________
zono - the thruster buster
--------------------------------------

zono
Posts: 78
Joined: Wed May 28, 2008 1:03 pm

Re: 2D PJ Pressure analizer

Post by zono » Sun Oct 10, 2010 8:55 pm

2Dflow 002 terminates with errors - sniff ! ( I am running wine windows emulator under Linux). Tomorrow I will have access to a XP computer. Hopefully......

wine: Unhandled page fault on write access to 0x01510898 at address 0x4027f2 (thread 0009), starting debugger...
Unhandled exception: page fault on write access to 0x01510898 in 32-bit code (0x004027f2).
Register dump:
CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
EIP:004027f2 ESP:0138f440 EBP:0150fea8 EFLAGS:00010203( - 00 - RI1C)
EAX:00000081 EBX:00000108 ECX:015d0898 EDX:00000107
ESI:00000000 EDI:00000000
Stack dump:
0x0138f440: 004051c4 000003e8 0000012c 00115e60
0x0138f450: 00000000 00000000 00000000 00000000
0x0138f460: 00000000 00000000 00000000 00000000
0x0138f470: 00000000 00000000 00000000 00000000
0x0138f480: 00000000 00000000 00000000 00000000
0x0138f490: 00000000 00000000 000003e7 0000012c
Backtrace:
=>1 0x004027f2 in 2dflow-002 (+0x27f2) (0x0150fea8)
2 0x004010b6 in 2dflow-002 (+0x10b6) (0x0150fee8)
3 0x00401148 in 2dflow-002 (+0x1148) (0x0150ff08)
4 0x7b8773a7 in kernel32 (+0x573a7) (0x0150ffe8)
0x004027f2: movb %al,0xfff40000(%ecx)
Modules:
Module Address Debug info Name (18 modules)
PE 400000- 1308000 Export 2dflow-002
ELF 7b800000-7b92d000 Export kernel32<elf>
\-PE 7b820000-7b92d000 \ kernel32
ELF 7bc00000-7bca4000 Deferred ntdll<elf>
\-PE 7bc10000-7bca4000 \ ntdll
ELF 7bf00000-7bf03000 Deferred <wine-loader>
ELF 7ee14000-7ee7e000 Deferred msvcrt<elf>
\-PE 7ee20000-7ee7e000 \ msvcrt
ELF 7ef9e000-7efa9000 Deferred libnss_files.so.2
ELF 7efa9000-7efb3000 Deferred libnss_nis.so.2
ELF 7efb3000-7efcb000 Deferred libnsl.so.1
ELF 7efcb000-7eff0000 Deferred libm.so.6
ELF 7eff7000-7f000000 Deferred libnss_compat.so.2
ELF b7505000-b7509000 Deferred libdl.so.2
ELF b7509000-b7658000 Deferred libc.so.6
ELF b7658000-b7670000 Deferred libpthread.so.0
ELF b7681000-b77b7000 Deferred libwine.so.1
ELF b77b9000-b77d5000 Deferred ld-linux.so.2
Threads:
process tid prio (all id:s are in hex)
00000008 (D) Z:\media\disk\software\2D flow 002\2dflow-002.exe
00000009 0 <==
0000000c
00000013 0
00000012 0
0000000e 0
0000000d 0
0000000f
00000015 0
00000014 0
00000011 0
00000010 0
Backtrace:
=>1 0x004027f2 in 2dflow-002 (+0x27f2) (0x0150fea8)
2 0x004010b6 in 2dflow-002 (+0x10b6) (0x0150fee8)
3 0x00401148 in 2dflow-002 (+0x1148) (0x0150ff08)
4 0x7b8773a7 in kernel32 (+0x573a7) (0x0150ffe8)
___________________________
zono - the thruster buster
--------------------------------------

zono
Posts: 78
Joined: Wed May 28, 2008 1:03 pm

Re: 2D PJ Pressure analizer

Post by zono » Mon Oct 11, 2010 11:47 am

hmmm, same problem with XP ! Program terminates with errors...

here is my config.cfg (even same errors when I adapted values of dump, dT and visc like this) :

-----------------------------
iframe=100; //quantos frames processar para tirar um shot
framelim=100000; //total de frames a processar
cof=8.205746E-5; //coeficiente de compressibilidade
dT=0.001; //delta Tempo por frame
//dump=1; //Coeficiente de amortecimento
//dump=0.9985;
dump=0.9999;
//dump=0.999;
//dump=1; //if dump=1 cancel the sim
visc=100000; //if visc=0 cancel the sim (this is viscosity=1/visc)
ivx=10; //if ivx=0 cancel flow simulation (create horizontal speed on the left and right side)
Gscale=20; //linear divisor for pressure output to Greyscale and B in RGB pressure
outtype=0; //0= gray // 1=RGB (B pressure 0=128 -1=127, G = Xspeed 0=0 -1=255, R = YSpeed 0=0 -1=255)
-----------------------------
___________________________
zono - the thruster buster
--------------------------------------

Suns
Posts: 23
Joined: Sun Sep 19, 2010 2:55 pm
Antipspambot question: 125

Re: 2D PJ Pressure analizer

Post by Suns » Wed Oct 13, 2010 3:13 pm

Woa,

First bugs!!
I will trace the error you get.
Doing this now. (assembly in the debugger!!!)

just fast reply, your image is bigger than 1024x768?

I was trying something different in the weekend, some video.
http://www.youtube.com/watch?v=sj1mhq7kMbc
My first try of the rcandy rocket fuel.

Well i will figure out your crash. something inside the loops. don´t appear to be the image size but if you can check this for me.
It is inside the loop of the color output.
The code do not pass inside the 0x004027f2 when the config outtype=0, only when =1.

Find an problem, forget to size correctly the buffer used for image output when using color output, it is 3x bigger, RGB 3 bytes per pixel not one. so it is likely to have an buffer overflow here.
If you get a error with the outtype=0, i will continue investigating.

Robinson

Suns
Posts: 23
Joined: Sun Sep 19, 2010 2:55 pm
Antipspambot question: 125

Re: 2D PJ Pressure analizer

Post by Suns » Thu Oct 14, 2010 11:35 am

Zono,

I corrected a buffer that has minor than needed, I´m surprised that i do not get a buffer-overrun in my computer...

put some buffers in dynamic allocation too.

If you can test this correction i´m grateful.
2dflow-0021.zip
(8.58 KiB) Downloaded 630 times
Robinson

zono
Posts: 78
Joined: Wed May 28, 2008 1:03 pm

Re: 2D PJ Pressure analizer

Post by zono » Mon Oct 18, 2010 8:14 pm

thanks, Robinson,

now I could perform tests with ver0021 . No errors, very good ! Colors are looking very funny, so I am not sure, if I use correct congig.cfg parameters. Can you post some appropriate examples of config files? This would be helpful.

Also I tested "the powder toy" , funny! Also there I don't know how to adapt these game params to physical units. Another goodie would be to perform your own physical params proberty sets. Any idea?
___________________________
zono - the thruster buster
--------------------------------------

Suns
Posts: 23
Joined: Sun Sep 19, 2010 2:55 pm
Antipspambot question: 125

Re: 2D PJ Pressure analizer

Post by Suns » Tue Oct 26, 2010 11:24 am

Zono,
Thanks for following my project, and making things flow!!

The colors work this way:
In the sample image the center value in green and red is on zero = zero, so if the speed is -1 the value of color will be 255. -2 = 254 (gives a good contrast without looking the rgb of the pixels)
strong red areas, air going up
strong green areas air going left
Blue is the pressure.

Color information can fold, so if you´re getting a gradient going to green and it keep reseting to black and going to green again for example the speed/ pressure is varying too much between the pixels.

For pressure I put a parameter in the config file.
Gscale=20; //linear divisor for pressure output to Greyscale and B in RGB pressure
It just divide the value by this factor and use as Blue when using color output.
I did not put a log output in this version.

My work in the new version rewriting is a little low at the moment but it is advancing with a normal coefficients and with unit propagation values. And with temperature.

I return here and get pumped to work on this hehehe.



Powder Toy is a game with a nice simulation engine, But center it focus as a sandbox game, maybe modifiable to make a powerful 2d simulation software, with fuels, pumps, output for external analysis, etc. And very fast drawing capability.

It make me thinks of something wrong in my engine too. Negative Pressure do not exist. hehe the game shows it, and I let it happen in my code too(normally it do not happen in my code as in the game, but anyway...).

Robinson

zono
Posts: 78
Joined: Wed May 28, 2008 1:03 pm

Re: 2D PJ Pressure analizer

Post by zono » Thu Nov 04, 2010 11:51 am

Hi Robinson,

good to hear, you will continue your work. For shock focusing tests I use rather black/white output of version 001. But again a request to you: please send some sample config-files of versions 002 with a small comment, what params have what values and how to predict, what params will cause or change in the run.

thanks, zono
___________________________
zono - the thruster buster
--------------------------------------

Suns
Posts: 23
Joined: Sun Sep 19, 2010 2:55 pm
Antipspambot question: 125

Re: 2D PJ Pressure analizer

Post by Suns » Mon Jul 11, 2011 3:03 pm

Sorry about the lost of online files.

I´m reposting the files on 4shared and in the forum.

I will be creating a page with the progress on the new version.

The file i´m uploading have all the executables from this development, the usefull ones is the 2dflow.exe and the 2dflow-0021.exe

http://www.4shared.com/file/UQC-Ol6V/2D ... Execs.html
2D-FlowSim-AllExecs.zip
All executables from this version
(28.38 KiB) Downloaded 530 times
Thanks.

Yeah i stopped the development for some time, but i do not forget this project.

Post Reply