I’m not asking you guys to make a rbmk-1000 reactor for me. I am just asking you guys how to achieve that? I mean way to achieve simulating a nuclear reaction with only using a script and zero use of roblox physics. Simulating thousands of neutron would melt everyone’s computer down.
I’m not sure I understand well what you mean. Do you mean how to simulate an atomic explosion? Could you give us a bit more informations please?
an atomic chain reaction. In order to avoid producing lots of lag, I need to make it only using a script.
Since I don’t know the context for what you need this, are you sure you need to make an atomic chain reaction in your script? I’m still not sure I understand well, however, since you don’t need to use any parts, couldn’t you use for example, after a certain amount of time or a randomly generated time happen what you want to happen (like an explosion, or saying the reactor is fine or whatever?) or if it’s when you hit a button which will do tests for the reactor, which, since you don’t want parts, it can totally be fake tests and just randomly choosing between true or false.
It is quite complicating, there are lots of data. like how much the rods have inserted, temperature , pressure and neutron rates. and also core poisoning. Like this video:https://www.youtube.com/watch?v=XLmFjCTa-FU.
Oh, ok, so you’re goal is to actually make a real simulation, like you’re goal is not to make a game which will always end up in the core reactor exploding and not only to create a script which will tell if the core is ok or not and if not explode or have something happening, right ?
oof, not always explode it maybe lasts forever.(Depend on controller’s skill) Yes, not only telling that the core is ok or not ok.
I may be wrong, but those kinds of simulators almost certainly don’t simulate the actual physical processes that go on in a nuclear reactor, at least not down to the individual particles. Instead, a mathematical model is used to represent what goes on, and the user/player can interact with this mathematical model. Instead of simulating particles being absorbed by control rods, the mathematical model somehow takes into account how far the control rods have been inserted and how that affects the neutron flux, or whatever else. Some things would make sense to represent as maths formulas, some as logic and such.
A super simple mock-up sim might look like this:
coolant_tank_liters = 10000
coolant_max_flow_l_per_s = 100
coolant_flow_valve_position = 0.25
reactor_temperature_k = 400
reactor_meltdown_temperature_k = 1000
function coolant_consumption_l_per_s()
return coolant_max_flow_l_per_s * coolant_flow_valve_position
end
function cause_reactor_meltdown(...)
print("KABOOM!")
end
function update_simulation(dt)
coolant_tank_liters = math.max(coolant_tank_liters - coolant_consumption_l_per_s() * dt, 0)
if coolant_tank_liters == 0 then
reactor_temperature_k += 20 * dt
else
reactor_temperature_k -= 5 * dt
end
if reactor_temperature_k >= reactor_meltdown_temperature_k then
cause_reactor_meltdown()
return false
end
return true
end
while wait(1/10) do
local reactor_alive = update_simulation(1/10)
if not reactor_alive then
break
end
end
print("Game Over!")
To make it more realistic you’d have to research how the different things actually impact what goes on, and of course there’s no way to control anything in the example above. You’ll probably be able to find a lot of info in the documenatation for actual simulators, but you might also have to research a lot of physics on your own.