Skip to content
Snippets Groups Projects
Commit 3661c41e authored by joergbuchwald's avatar joergbuchwald
Browse files

add interpolation curve for thermal conductivity

parent c941d0bc
No related branches found
No related tags found
No related merge requests found
......@@ -45,3 +45,22 @@ class conductivity_2(template.PROPERTY):
string = self._getcodeasstring("dvalue",None)
string = self._convertpythontoexprtk(string)
return string
#(4.12292/298.15-1.63866*2*(temperature/298.15))*0.6065
class conductivity_3(template.PROPERTY):
def value(self, temperature):
# use only one-liner to keep it parsable:
return (-1.48445+4.12292*(temperature/298.15)-1.63866*(temperature/298.15)**2)*0.6065
def dvalue(self, temperature):
# use only one-liner to keep it parsable:
return (4.12292/298.15-1.63866*2*(temperature/298.15))*0.6065
def dvaluenum(self, temperature):
return np.gradient(self.value(temperature),temperature)
def exprtk_value(self):
string = self._getcodeasstring("value", None)
string = self._convertpythontoexprtk(string)
return string
def exprtk_dvalue(self):
string = self._getcodeasstring("dvalue",None)
string = self._convertpythontoexprtk(string)
return string
......@@ -22,7 +22,7 @@ class WATER:
viscosity.viscosity_2,
viscosity.viscosity_3,
viscosity.viscosity_4]
self.conductivities = [conductivity.conductivity_1, conductivity.conductivity_2]
self.conductivities = [conductivity.conductivity_1, conductivity.conductivity_2, conductivity.conductivity_3]
self.specificheatcapacities = [specificheatcapacity.specificheatcapacity_1, specificheatcapacity.specificheatcapacity_2]
self.expansivities = [expansivity.expansivity_1, expansivity.expansivity_2]
self.rho = self.densities[rho]()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment