Lorenz Waterwheel (Need help with the water part)

I’m looking to simulate a Lorenz Waterwheel and graph it simultaneously in JmonkeyEngine. I’m in the planning stages of the project have have hit a serious speedbump. I’m not sure how to go about and actually simulate the water. To my knowledge, the water class in jme is just an effect and isn’t implemented in bulletphysics. It has no weight, and doesn’t really flow accordingly.



I suppose I could go about making my own water class using spheres? I worry that I may run into hardware problems as the quality of the flow truly depends on the concentration of spheres. Colligative properties might be a pain as they play a huge role in water flow. I don’t plan on introducing turbulence, at least not to its fullest. Pressure/flow speed should be pretty straight-forward. Does anyone have any better ideas? And if I’m missing something in the water class please tell me as this would save much time.



Thanks.

Well this is not a simple matter.

You should look around the internet for article on how it has been implemented in recent games



There are some article in Game Programming Gems 8 a on water simulation in Batman Arkam Asylum using PhysX, and i think I’ve seen some erosion simulation article in ShaderX 7.

I think those books can be purchased in pdf version.



Also check the From Dust project, don’t know if there are tech articles about it but it’s just awesome :stuck_out_tongue:

I suggest point particles and manually doig the physic part, cause with full bullet physics you will probably kill any computer out there.

I think there is some way to manipulate them directly but I never had to, might be worth to look into the effect tests however.

Ehh not colligative properties. I mean intermolecular forces /hydrogen bond forces. Colligative properties have no place here. Suppose I should study for my AP Chem test next month…



I may be able to ignore them completely and just use some simplified flow rate formulas but that’s much less interesting.



And one last question, am I best off using particles instead of spheres to simulate the water? I fear too many spheres will crash the program while particles seem to require less computation. Any way to monitor and manipulate individual particles?



Thanks.

Alright, I have begun work. I’ve decided for simplicity’s sake to work with jbullet and spheres. I know this won’t grant me a true waterwheel but I believe similar results can be attained with a brownian motion method and simple cohesion forces.



I am currently wondering which is the best way to go about and create the wheel. Jme’s joints only connect 2 spatials while I have to connect 6 cups to a joint. I am thinking that I can attach a simple sphere to the joint, then proceed to attach the cups to that sphere. The problem I have run into comes with attaching the sphere to the joint. I want the base sphere to be able to spin without actually translating(moving).



The trick lies in getting the cups to move around the sphere while maintaining distance between them. I can easily make 6 independent pendulums, but combining them is tricky. Any ideas?

combine them to one large geometry culd work not sure what exactly is needed for your simulation requirements.

How would I combine them into one large geometry? I know I can attach them all to a single node, but don’t know how to combine into one geometry.

I have run into yet another problem. I tried to use joints and pivots to handle the rotations. Conceptually it should work, but JME crashes anytime I use more than 1 joint. Does anyone have some experience working with joints?

“jme crashes” is not a really helpful description, whats the error output? The latest ragdoll improvements show that multiple joints work just fine. Probably you are doing something wrong. Information on how to use them is in the manual and wiki, as always.

What type of joint do you use?

For the ragdoll I started with coneJoints, they work fine, but the way to limit their rotation is not really intuitive.

I ended up using SixDofJoints, they work great and are very tweakable.



I guess you don’t have that much constraint to apply to the joints so ConeJoints should work fine in your case.

What kind of crash do you have?

I’m using PhysicsHingeJoint from the tutorials. I attach a cup to a central immovable pivot. I restrict rotation to one axis so the wheel stays in line. Then I attach a Physics JointHinge from cup to cup with absolute restriction of movement. It keeps the cups from acting independently. It has worked for a set of two cups, but when I triy to indroduce cups 3 and 4, I get a nullpoint exception in Jbullet. Is there something in the order of parameter nodes that is important? Does nodeA take precedence over nodeB? I’ll post error message below. I’ll also try scrapping PhysicsHingeJoints entirely and introduce SixDOFJoints.

As said, you are doing something wrong, like removing the joint two times or adding it two times.

Fixed the issue, my cups were spawning too close to eachother. I hate to keep coming here with my problems, but I have run into another.







I have constructed a wheel out of nodes. It responds to forces perfectly. Now I need to attach the cups to these joints. The problem is, when I try to attach my cup to these nodes, they attach to the central pivot. I wish for each cup to attach to each joint and swing independently.

Here’s what happens when I try to add my cup to one of the cubes:







The cup(blue thing) attaches to the middle node instead of attaching to the cube. Does the order in which they are attached matter?