Skip to content

Commit

Permalink
fix: avoid zero discharge pressure after validation of operational co…
Browse files Browse the repository at this point in the history
…nditions
  • Loading branch information
olelod authored Jun 13, 2023
1 parent daffdb3 commit 830c75e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ def validate_operational_conditions(
for i, failure in enumerate(tmp_failure_status):
validated_failure_status[indices_to_validate[i]] = failure

# any remaining zero or negative suction pressures (for unvalidated time steps, others are already changed)
# any remaining zero or negative suction/discharge pressures (for unvalidated time steps, others are already changed)
# must be set to 1 (for neqsim to initiate fluid streams)
validated_suction_pressure = np.where(validated_suction_pressure <= 0, 1, validated_suction_pressure)
validated_discharge_pressure = np.where(validated_discharge_pressure <= 0, 1, validated_discharge_pressure)

return (
validated_rate,
Expand Down

0 comments on commit 830c75e

Please sign in to comment.