@@ -14,18 +14,20 @@ use uom::si::f64::Mass;
1414use uom:: si:: mass:: kilogram;
1515
1616#[ allow( dead_code) ]
17- /// Minimum error allowed for energy difference. TODO: Change this to a
18- /// relative scale instead of an absolute scale.
17+ /// Minimum error allowed for energy difference.
18+ /// TODO: Change this to a relative scale instead of an absolute scale.
1919pub static TOLERENCE_ENERGY : Lazy < Energy > =
2020 Lazy :: new ( || Energy :: new :: < joule > ( 5.0 ) ) ;
2121
2222#[ allow( dead_code) ]
23- /// Minimum error allowed for mass difference. TODO: Change this to a relative
24- /// scale instead of an absolute scale.
23+ /// Minimum error allowed for mass difference.
24+ /// TODO: Change this to a relative scale instead of an absolute scale.
2525pub static TOLERENCE_MASS : Lazy < Mass > =
2626 Lazy :: new ( || Mass :: new :: < kilogram > ( 5.0 ) ) ;
2727
2828#[ allow( dead_code) ]
29+ /// # MassBalance
30+ ///
2931/// Trait for ensuring the overall mass balance is maintained in a flowsheet.
3032///
3133/// This trait can be implemented by any block that needs to ensure mass
@@ -169,6 +171,9 @@ impl Mixer {
169171 fn compute_outlet_pressure ( & self ) { }
170172}
171173
174+ /// # Block Tests
175+ ///
176+ /// The following module holds all the unit test cases for the blocks module
172177#[ cfg( test) ]
173178mod block_tests {
174179 use crate :: connector:: { Econnector , Mconnector } ;
@@ -179,6 +184,7 @@ mod block_tests {
179184 use uom:: si:: mass:: pound;
180185
181186 #[ test]
187+ /// checks whether the mass balance check function was implemented properly
182188 fn test_mass_balance_check_steady_state_for_mixer ( ) {
183189 // here you will need to check that the mass into the mixer = mass out of mixer
184190
@@ -197,6 +203,7 @@ mod block_tests {
197203 }
198204
199205 #[ test]
206+ /// checks if the 'energy_balance_check' function was implemented properly
200207 fn test_energy_balance_check_steady_state_for_mixer ( ) {
201208 // energy into mixer = energy out of mixer
202209 let mixer_test_obj = Mixer {
@@ -214,6 +221,7 @@ mod block_tests {
214221 }
215222
216223 #[ test]
224+ /// checking functionality of 'compute_total_outlet_mass_flow'
217225 fn test_compute_total_outlet_mass_flow ( ) {
218226 let in_streams_mass = vec ! [
219227 Mconnector {
@@ -231,6 +239,7 @@ mod block_tests {
231239 }
232240
233241 #[ test]
242+ /// checking functionality of 'compute_outlet_energy_flows'
234243 fn test_compute_outlet_energy_flows ( ) {
235244 let in_streams_energy = vec ! [
236245 Econnector {
0 commit comments