How would one simulate the law of conservation of energy?
I'm having a lot of trouble understanding the question as posed, but I think it's worth making a few general comments about conservation laws and how they are used in physical simulation.

Conservation laws happen because of Noether's theorem. When you are investigating how some physical system evolves over time, it's usually the case that the exact moment when $t=0$ is an arbitrary choice; you could start it 10 seconds later and the system would evolve the same. This is known as time translation symmetry. Any physical system which is time translation invariant is a system where energy is conserved.

Let's take as an example the problem of simulating a gas, where viscosity can be ignored, in one dimension.

We denote $\rho(x,t)$ as the density of the gas at a time and place, $v(x,t)$ is the velocity, $E(x,t)$ is the energy, and $p(x,t)$ is the pressure.

Then the equations we are solving are the Euler equations:

$$\frac{\partial}{\partial t}  \rho + \frac{\partial}{\partial x}  \rho v = 0$$
$$\frac{\partial}{\partial t}  \rho v + \frac{\partial}{\partial x}  \left( \rho v^2 + p \right) = 0$$
$$\frac{\partial}{\partial t}  E + \frac{\partial}{\partial x}  v\left(E + p\right) = 0$$

The pressure is defined in terms of the other variables, called the "equation of state". If we assume an ideal gas, $E = \frac{p}{\gamma - 1} + \frac{1}{2} \rho v^2$ where $\gamma$ is the heat capacity ratio, which is different for different gases.

The Euler equations are, respectively, conservation of mass, conservation of momentum (note that $\rho v$ is momentum), and conservation of energy. The equations state that a local change of (say) energy in time is balanced exactly by a change in space. So those three conservation laws are, in a deep sense, exactly the system that you are trying to simulate.

So I think that it's misleading to think of conservation of energy as something to exploit in simulating some physical system. Conservation of energy is a central part of the system that you're trying to simulate.

One last thing: Physical simulation, especially of thermodynamic systems, suffers from a phenomenon known as "numerical dissipation" or "numerical dispersion". The fact that you are using discrete time steps to simulate a continuous system means that something has to give, and depending on the numerical methods that you are using, this sometimes translates as unwanted diffusion of some quantity that should be locally conserved. Like energy.