ControlVolume.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Chemistry-ChemEng 作者: AndyWilliams682 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号