diff --git a/Physics/water/water/properties/conductivity.py b/Physics/water/water/properties/conductivity.py index 48cabd151edefd3e86d9e1c89b30ec8147cd1212..a5626733a0e029e76138643e838c961311cb4a14 100644 --- a/Physics/water/water/properties/conductivity.py +++ b/Physics/water/water/properties/conductivity.py @@ -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 diff --git a/Physics/water/water/water.py b/Physics/water/water/water.py index 5f63d56179be99cd6db08789ed445b11452c7846..abf5cf3b3b55c582cb8a068da71d143e76005b26 100644 --- a/Physics/water/water/water.py +++ b/Physics/water/water/water.py @@ -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]()