From 352a0d531a3235486ed0e4489069de46d6d11301 Mon Sep 17 00:00:00 2001 From: Julian Gegner Date: Tue, 8 Nov 2022 22:23:56 +0100 Subject: [PATCH] warmth capacity in kg --- lib/models/EnergyBilanceModel.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/models/EnergyBilanceModel.dart b/lib/models/EnergyBilanceModel.dart index 1e96f1c..8c4fb6b 100644 --- a/lib/models/EnergyBilanceModel.dart +++ b/lib/models/EnergyBilanceModel.dart @@ -13,8 +13,8 @@ class EnergyBilanceModel extends ChangeNotifier { final double _gravity = 9.81; //in m/s^2 - final double _waterHeatCapacity = 4.181; //J / (g * C°) - final double _ironHeatCapacity = 0.439; //in J / (g * C°) + final double _waterHeatCapacity = 4181; //J / (kg * C°) + final double _ironHeatCapacity = 439; //in J / (kg * C°) double _waterTemparatureStart = 20; //in °C final int _temparatureToBoilWater = 100; //in °C @@ -28,8 +28,8 @@ class EnergyBilanceModel extends ChangeNotifier { double get potentialEnergy => _weight * _gravity * deltaHeight; //in Joule = m^2 kg/s^2 double get kineticEnergy => _weight * pow(deltaVelocity, 2) / 2; - double get amountOfBoilingWaterInL => (((potentialEnergy + kineticEnergy) / _waterHeatCapacity) / (_temparatureToBoilWater - _waterTemparatureStart)) / 1000; //in litre - double get amountOfGlowingIronInKg => (((potentialEnergy + kineticEnergy) / _ironHeatCapacity) / (_temparatureToMakeIronGlow - _ironTemparatureStart)) / 1000; + double get amountOfBoilingWaterInL => (((potentialEnergy + kineticEnergy) / _waterHeatCapacity) / (_temparatureToBoilWater - _waterTemparatureStart)); //in litre + double get amountOfGlowingIronInKg => (((potentialEnergy + kineticEnergy) / _ironHeatCapacity) / (_temparatureToMakeIronGlow - _ironTemparatureStart)); //in kg void setStartVelocity(double v){ _startVelocity = v;