def degrees_of_freedom_update(self):
"""This method calculates and updates the degrees of freedom for a system. If the system has as many equations
as it has unknowns, then it as zero degrees of freedom and will be solved. Otherwise, it must wait for a
substitution to occur to lower the unknowns in the system."""
# The degrees of freedom equation
self.degrees_of_freedom = self.unknowns - len(self.equations_dict) + 1
# If the system lacks any degrees of freedom, then it is solvable, and the solve() method will run
if self.degrees_of_freedom == 0:
print('Solving control volume {}'.format(self))
self.solve()
ControlVolume.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录