diff --git a/ogs6py/classes/processes.py b/ogs6py/classes/processes.py index f477319..a6d3703 100644 --- a/ogs6py/classes/processes.py +++ b/ogs6py/classes/processes.py @@ -87,10 +87,19 @@ def set_process(self, **args): self.populate_tree(self.process_baseentries["darcy_gravity"], "g",text = str(entry)) if "specific_body_force" in args: - self.populate_tree(self.process, "specific_body_force", text=" ".join(str(x) for x in args['specific_body_force'])) + if isinstance(args["specific_body_force"], list): + self.populate_tree(self.process, "specific_body_force", + text=" ".join(str(x) for x in args['specific_body_force'])) + else: + self.populate_tree(self.process, "specific_body_force", + text=args["specific_body_force"]) for key, value in args.items(): - if isinstance(value, str): - self.populate_tree(self.process, key, text=value) + if key not in ["darcy_gravity", "specific_body_force"]: + if isinstance(value, str): + self.populate_tree(self.process, key, text=value) + else: + raise RuntimeError(f"{key} is not of type string") + def set_constitutive_relation(self, **args):