@@ -112,13 +112,12 @@ class GnomeOilSchema(SubstanceSchema):
112
112
boiling_point = NumpyArraySchema (missing = drop , save = True , update = True )
113
113
molecular_weight = NumpyArraySchema (missing = drop , save = True , update = True )
114
114
component_density = NumpyArraySchema (missing = drop , save = True , update = True )
115
- # sara_type = SequenceSchema(SchemaNode(String()),
116
- # missing=drop,
117
- # save=True,
118
- # update=True)
115
+ sara_type = SequenceSchema (SchemaNode (String ()),
116
+ missing = drop ,
117
+ save = True ,
118
+ update = True )
119
119
num_components = SchemaNode (Int (), missing = drop , save = True , update = True )
120
120
121
-
122
121
class GnomeOil (Substance ):
123
122
"""
124
123
Class to create an oil for use in Gnome
@@ -292,11 +291,11 @@ def _init_from_json(self,
292
291
self ._set_pc_values ('boiling_point' , boiling_point )
293
292
self ._set_pc_values ('component_density' , component_density )
294
293
295
- # if len(sara_type) == self.num_components:
296
- # self.sara_type = sara_type
297
- # else:
298
- # raise ValueError("You must have the same number of sara_type "
299
- # "as PCs")
294
+ if len (sara_type ) == self .num_components :
295
+ self .sara_type = sara_type
296
+ else :
297
+ raise ValueError ("You must have the same number of sara_type "
298
+ "as PCs" )
300
299
301
300
self ._k_v2 = None # decay constant for viscosity curve
302
301
self ._visc_A = None # constant for viscosity curve
0 commit comments