Skip to content

Commit

Permalink
Rescale charge constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
bocklund committed Jun 9, 2019
1 parent 6975094 commit e7a4890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycalphad/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def get_internal_constraints(self):
total_charge = 0
for idx, (sublattice, site_ratio) in enumerate(zip(self.constituents, self.site_ratios)):
total_charge += sum(v.SiteFraction(self.phase_name, idx, spec)*spec.charge*site_ratio for spec in sublattice) - TARGET_CHARGE
total_charge *= 1.0/10.0 # rescale charge constraints
total_charge *= 1.0/100.0 # rescale charge constraints
constraints.append(total_charge)
return constraints

Expand Down

0 comments on commit e7a4890

Please sign in to comment.