How do you go about programming a power plant simulation in UE4?

Okay, I may be able to give you a few initial pointers, but I don't think this is going to be easy given the nature of the modelling you're trying to do. If what you're after is a physics simulation of pressure, flow, and similar then you're going to be disappointed and would basically need to write one yourself and bolt it on, using UE4 to visualize your calculations, the particle system will not help.

For the control room you're likely to need to know the basics of either Blueprint or C++ interaction (Tutorials for both are on the Epic YouTube stream), and a decent bit of UMG which would be needed for screen displays. None of this should be too difficult, although learning enough to do it may take a while.

For the particle simulation though things may be more challenging. Here you have three choices, and I'd recommend following the Introduction to Particles series on YouTube before you make it.

The first option is to try to build the simulation using CPU particles, applying collision and acceleration modules to make them flow through your model. This will give you the benefits that you can easily tweak the forces involved, but it's less realistic and more limited in the number of particles you can render.

The second option is to use GPU particles, and their global vector fields. Here you use a tool such as Maya's fluid dynamics system to model the flow through your simulation, possibly breaking it down into multiple components, then export vector fields to drive the particles through inside of UE4. This is difficult, fluid dynamics is not a simple art (and certainly not one I'm any good at!), but I feel it would give a reasonably realistic looking simulation.

A major limitation with the first two is the intent of UE4's particle system which is to produce compelling visualizations rather than drive physically-accurate data models. This means that the simulation will not be totally accurate, and more importantly that you're unable to pull out the positions of the individual particles to drive pressure calculations to then apply feedback into the system. You can do the calculations and make the particles react based on them, but you can't have the particles drive the model by creating pressure and so forth.

This leads to the third, and by far the scariest, option which is to integrate a physics-based fluid dynamics system in C++ and use this to drive the particles in the simulation. This is a major task without a starting platform, writing real-time simulations which 'look right' is difficult, writing real-time simulations which are right is much more difficult- and one more suited to a university research team than a sole coder in my opinion. There are then ways to get this to drive the positions of particles in the engine, a custom GPU particles module which read in positions encoded in a 48-bit image could drive the positions, but to be honest this would be the least of your challenges.

/r/unrealengine Thread