Skip to content

Commit

Permalink
Fixed 'chi' not being pulled through when using Constant_Yield_Stress…
Browse files Browse the repository at this point in the history
… and vectorizing the output of all 'constant' models.
  • Loading branch information
David J. Walters (pn1932743) committed May 10, 2024
1 parent 8f65181 commit 3bb459e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions impala/physics/physical_models_vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Constant_Specific_Heat(BaseModel):
consts = ['Cv0']

def value(self, *args):
return self.parent.parameters.Cv0
return self.parent.parameters.Cv0 * np.ones(len(self.parent.state.T))

#class Linear_Specific_Heat(BaseModel):
# """
Expand Down Expand Up @@ -203,7 +203,7 @@ class Constant_Melt_Temperature(BaseModel):
consts = ['Tmelt0']

def value(self, *args):
return self.parent.parameters.Tmelt0
return self.parent.parameters.Tmelt0 * np.ones(len(self.parent.state.T))

#class Linear_Melt_Temperature(BaseModel):
# """
Expand Down Expand Up @@ -259,7 +259,7 @@ class Constant_Shear_Modulus(BaseModel):
consts = ['G0']

def value(self, *args):
return self.parent.parameters.G0
return self.parent.parameters.G0 * np.ones(len(self.parent.state.T))

#class Linear_Shear_Modulus(BaseModel):
# consts = ['G0', 'rho0', 'dGdRho' ]#
Expand Down Expand Up @@ -365,10 +365,10 @@ class Constant_Yield_Stress(BaseModel):
"""
Constant Yield Stress Model
"""
consts = ['yield_stress']
consts = ['yield_stress', 'chi']

def value(self, *args):
return self.parent.parameters.yield_stress
return self.parent.parameters.yield_stress * np.ones(len(self.parent.state.T))

def fast_pow(a, b):
"""
Expand Down

0 comments on commit 3bb459e

Please sign in to comment.