As Madmanguruman says, the capacitor is in the wrong place.
The opamp is trying to keep the voltages on it's inverting input the same as the non-inverting input, which is 240mV in your example above. To do this with just Rsense present, it must keep 480mA flowing through Rsense as you say.
Now, with the cap in series, it will actually work to charge the capacitor as you have it. However, the catch is that it will not be at a constant current, and the cap will only charge to 240mV, since this it what the opamp needs to keep the balance.
The cap does not pass DC, so the current is initially 480mA, and drops exponentially down to 0 as the voltage rises (and the voltage across the resistor drops)
Another thing to understand here is that a simulation is only as real as you make it, and in some cases the ideal components cause problems. It's quite common for the simulator not to converge or produce odd results if there is no DC path available. Also with a transient simulation, you sometimes need initial conditions set to observe a process.
For example, if I simulate the above circuit in LTSpice with an ideal 1F capacitor, the simulation does not converge (never finishes) If I add a high value of parallel resistance (10MΩ, this is actually very conservative for such a large value, probably be much lower) to provide a DC path, and (very roughly) simulate real world imperfect capacitor leakage, the simulation works:
Simulation:
The 240mV is produced by the 24nA across the 10MΩ resistance (24e-9 * 10e6 = 0.24V) However, the cap starts the simulation at 240mV. Is this what will happen in real life? It's unlikely, so we need to simulate things as it will be when power is switched on, or at least with the cap starting with 0V across it. The reason this happens (in SPICE at least) is because there is an initial DC operating point simulation done before the transient simulation starts.
If we do the same simulation with an initial condition specified, we can see the "interesting" bit that happens prior to reaching a steady state:
So remember to be aware of the difference between ideal and real world components. If simulation results appear strange, then try adding some ESR/ESL (equivalent series resistance/inductance) and parallel resistances to simulations that correspond with the components you intend to use (datasheet will give values usually)
Also be aware of tolerances, for which monte carlo simulation is very useful.
Finally, here is the circuit with the cap placed in the right place, (although you may want high side current limiting in your final circuit):
Simulation of current through cap and voltage across it, notice the constant 480mA up until the cap is fully charged to 4.8V (initial condition used again to see the cap charging):
One last thing, make sure you do not use the LM741 in your final circuit, it's completely obsolete. Choose a decent general purpose rail to rail input/output opamp (rail to rail means it can swing all the way to each rail at the output and handle voltages up to each rail at the input, many opamps, including the 741, cannot do this - another departure from the convenient world of ideal components)
A computer power supply is really not suitable for charging photo flash capacitors to near working voltage. It may be safe, if you use a series resistor to limit the current and take care as to the polarity(!), but it won't charge them to anywhere near full voltage, and since energy is proportional to voltage squared, the energy storage will be very low.
Charging photo flash capacitors to near working voltage, particularly in parallel or series groups, is not a suitable project safety-wise for high school students, particularly unsupervised, no matter what some of us may or may not have survived in our youth.
Best Answer
That should work as far as the capacitor is concerned, but the PSU might not like it. It all depends on that; it might draw too much current from it. But what you could do is buy a resistor to put in series. You can use the following two formulas to work out the resistance and power rating they'd need to be:
P = I V
R = V / I
So if you want to use the 4v PSU and it has a 2A rating, the resistor you should use is:
R = 4v / 2A = 2 ohms (or higher)
And the resistor's power rating should be: P = 4v x 2A = 8W (or higher).
The 4v PSU sounds like the best choice, because less power would be wasted in the resistor while charging the capacitor. Also, since it has a high current rating, it should be faster than the other PSUs. [However, as the capacitor charges more fully, it will slow down charge rate to about a third. (4-2.5)/4 = 37% speed.]
If you had a 150v PSU, you would waste about 98% of power but it would maintain 99% of charging speed.
To help you decide on a PSU: for the fastest charging speed, you want a PSU with the highest current rating. (So a 24v, 2A PSU would charge at the same speed as a 4v, 2A PSU). But the closer the PSU's voltage is to 2.7v, the less power you will waste on the resistor. So if you used a 24v, 2A PSU and a 4v, 2A PSU with resistors as calculated above, they would charge it at the same rate. But the 24v PSU would consume a lot more power doing so, wasting it through the resistor.
simulate this circuit – Schematic created using CircuitLab
You could use the following circuit to stop at a given voltage:
simulate this circuit
That should charge the capacitor up to about 2.3v. (A bit of safety margin is a good thing)