r/NuclearEngineering • • 2d ago

Software dev building an educational power plant simulator: which physics fundamentals should I learn first?is it even worth the time?

Hi all,

I'm a backend software developer interested in energy systems, and I'm starting an educational project to learn the domain properly. I'm not trying to model a real reactor, just to build something physically coherent instead of random numbers.

The plan:

- A Python simulator of a simplified PWR-style plant (reactor core, primary loop, steam generator/turbine, generator) that produces telemetry such as temperatures, pressures, flow rates, turbine speed and electrical output.

- Variables that depend on each other. For example, degraded heat transfer should reduce steam production and eventually electrical output.

- A backend that ingests the telemetry over MQTT, stores it, and raises alerts on abnormal conditions, plus a live monitoring dashboard.

- Later, a digital twin with what-if scenarios.

To be clear, this is educational only, not a safety analysis or control tool.

My weak spot is the physics, and I'd really appreciate guidance on:

  1. Which fundamentals matter most for a credible simplified model (thermodynamics, heat transfer, the Rankine cycle, basic fluid mechanics, simple reactor kinetics)? Is there an order you'd learn them in?

  2. Are there good textbooks, courses or lecture series for someone with a programming background but only basic physics?

  3. What simplifications are reasonable, and which common mistakes would make a toy model misleading?

  4. Is there open-source simulation or teaching material I should look at instead of starting from scratch?

Thanks in advance. Pointers, critiques and reality checks are all welcome.

1 Upvotes

9 comments sorted by

5

u/lommer00 2d ago

It seems like you've applied your software engineering expertise to really overcomplicate this.

Why have a separate backend and use MQTT? This simulator could be a single coherent app.

And what do you mean by digital twin? Normally that means it's mirroring a physically real specific piece of equipment, which won't be the case for you because (a) your simulator is generalized, and (B) you couldn't get the detailed telemetry and maintenance/inspection reports from a power plant to build an actual digital twin even if you did have the desire to go that far.

-1

u/National_Level4997 2d ago

The digital twin is a next goal to mimic how a nuclear reactor work that id linked to a monitoring system also built by me, the generalized simulation is a way to gain something(a portfolio project) in case i decided not dive deeper in physics.

2

u/Initial_Strategy_515 2d ago

I’m sorry, why are you building this? simulators already exist.

1

u/National_Level4997 2d ago

Everything already exists. As a student I'm building stuff just to show that i can build it and operate already built ones and also to show that my knowledge can be transferred to related things. We shouldn't expect everyone to invent things.

2

u/Initial_Strategy_515 2d ago

Okay, love the motivation. I’ve built a basic neutron scattering model in geant4 years ago. If you ever build some reactor core simulation in python, I’d love to check it out.

3

u/Alternative_Act_6548 2d ago

start with undergrad thermodynamics and a rankine cycle. The nuke part of that is the heat input, you then choose how muck detail you want to add. If it's just a steady state model the nuke part is simply heat, the reset of the balance of plant can be modeled reasonable simply to scale to off-design loads

1

u/existing4abit 1d ago

1: Thermodynamic principles -> Rankine and other Thermo cycles -> some (heavily simplified) fluid mechanics -> reactor statics (statics as in the stationary /unchanging reactor not statistical analysis) -> Reactor kinetics 

2: The U.S. DOE has some free volumes of nuclear physics that provide a pretty decent background for nuclear reactors, no complex math involved and could be pretty easy to implement some of that stuff for a heavily simplified reactor ( https://www.navsea.navy.mil/Portals/103/Documents/NNPTC/Physics/doe_phys_nuc.pdf) <- volume 1 of 2, there should be some Thermo volumes as well, but I’d say that only try dealing with basic k_eff for a first go through core design with like the 6 factor formula)

3.1: for assumptions, Treat your reactor like a simplified heat source before doing any further physics research so you can verify the basic cycle parameters match with something feasible for real thermodynamics. Would absolutely assume zero pressure of energy loss to static components based on pipe length or radiative heat loss. Starting out with the Thermo cycle, keeping the components ideal with pump, turbine, and their respective efficiencies equal to 1 would probably be a good starting point. 

3.2: for things that could make your model misleading, I would really just advise sticking with info on light water reactors, there’s tons of research and plant experience related to these and trying to do analysis for a more novel design would be effectively enrolling yourself in a post-doc program. 

4: For reactor theory and modeling specifically, there’s a decent program called OpenMC ( https://openmc.org/) which has a pretty good Python API. You can use it to build 2d or even 3d reactor models and check k_eff for a design you can make yourself. Its current documentation is geared towards people with nuclear engineering or particle physics backgrounds, BUT you’ll have the benefit of understanding the software more intuitively than when a bunch of other undergrads and I were forced to learn it for project work.

There is also an additional toolkit/method you can enable for OpenMC called DAGMC, combined with an appropriate modeling software you can use that to build simple models with a CAD file and do some surface merging to import them for use with OpenMC. (All of this stuff is decently complex though so I wouldn’t recommend starting here, get the loop you want down before branching out and attempting to couple responses or feedback to your simulator.)

0

u/30_characters 2d ago

Have you considered the major vendors, e.g. Emerson (Ovation Digital Twin & Embedded Simulation), Cisco (no dedicated OT simulation I'm aware of), Rockwell Automation, Mitsubishi, GE (mainly around the Mark VIe steam turbines), Siemens (Omnivise T3000, Simcenter Amesim and the Digital Twin Data Platform), or Fortifyd (more built around cybersecurity test bests)?

chatGPT says there's also

  • GSE Solutions (3KEYMASTER): GSE is an industry provider of full-scope and simplified PWR, BWR and Small Modular Reactor (SMR) digital twin simulators. Their physics engines model core kinetics, multi-phase thermal-hydraulics, steam headers, turbine speed and excitation. They provide bridge interfaces to OPC UA and MQTT.
  • CORYS: CORYS develops dynamic PWR simulation engines (ALCES and HYDRAULIX) used for engineering studies and digital twins that integrate with external SCADA/IoT backends.

Recommended Architecture

To achieve a simplified PWR simulator with native MQTT telemetry, storage, alerting and future what-if scenarios, the industry standard pattern uses a three-tier decoupled stack:

  1. Simulation Engine: Run a simplified PWR Modelica model, an open-source IAEA educational simulator core, or a tool like Ansys Twin Builder / Simcenter Amesim . This provides the physical interdependencies (temperatures, pressures, flow rates, steam generation and turbine speed).
  2. Telemetry Ingestion Layer: Use an industrial edge client (e.g., Python Paho MQTT or Rockwell FactoryTalk Edge) reading tags via OPC UA or memory offsets and publishing JSON payloads over an MQTT broker (such as HiveMQ or Eclipse Mosquitto) .
  3. Storage, Alerting and Digital Twin: Direct the MQTT stream into a time-series database (such as InfluxDB or TimescaleDB) coupled with Grafana for live monitoring and alert rules, or feed it into Azure Digital Twins / AWS IoT TwinMaker for scenario simulation

-4

u/sfzombie13 2d ago edited 2d ago

if it were me i'd just throw gabe at it. he's my persona of the chatgpt account i use for all my programming needs. i know enough about programming to understand some of what is put out and tell the difference between languages on sight. i can make it say 'hello world' in about 30 of them including arm assembly. not nearly enough to make things but i am now an app developer with five apps on the play store and 15 more in testing.

you do have to learn physics though, for the knowledge if nothing else. i recommend feynman's lectures to start with. great stuff there. some of it is outdated but you can't beat learning from this man if you want to know the basics.

edit: just found these videos on youtube. i had the caltech one bookmarked but just found these.