pecos / tps

Torch Plasma Simulator
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Power input controls #196

Closed trevilo closed 1 year ago

trevilo commented 1 year ago

This PR adds simple logic to control the power deposited in the plasma for a cycle-avg-joule-coupled simulation.

Specifically, there are two new input file parameters:

solver/input-power
solver/initial-input-power

These are only available when solver/type = cycle-avg-joule-coupled. When set, the Joule heating is scaled (uniformly in space) such that the total power deposited in the plasma (target_power below) is as follows:

delta_power = (input_power_ - initial_input_power_) / max_outer_iters_;
target_power = initial_input_power_ + (outer_iters + 1) * delta_power;

This allows the user to linearly ramp between initial-input-power and input-power over the course of a simulation. If input-power is set but initial-input-power is not, then initial-input-power is set equal to input-power such that the power is simply constant at input-power. If input-power is not set then the power level is not controlled. In that case, the Joule heating is determined by the current, along with the rest of the solution.