Example #1
0
    def __init__(self, Model, settings):

        KM.Process.__init__(self)

        default_settings = KM.Parameters("""
            {
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "constrained"          : false,
                "value"                : "z",
                "set_mesh_z_to_zero"   : true
            }
            """
            )
        settings.ValidateAndAssignDefaults(default_settings)
        settings.AddEmptyValue("variable_name").SetString("TOPOGRAPHY")

        self.model_part = Model[settings["model_part_name"].GetString()]
        self.depends_on_time = settings["value"].GetString().find('t') != -1
        self.set_mesh_z_to_zero = settings["set_mesh_z_to_zero"].GetBool()
        process_settings = settings.Clone()
        process_settings.RemoveValue("set_mesh_z_to_zero")

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, process_settings)
Example #2
0
    def __init__(self, Model, settings):

        KM.Process.__init__(self)

        default_settings = KM.Parameters("""
            {
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "variable_name"        : "HEIGHT",
                "constrained"          : false,
                "value"                : "1.0",
                "set_minimum_height"   : true,
                "minimum_height_value" : 1e-4
            }
            """)
        settings.ValidateAndAssignDefaults(default_settings)

        self.variable = settings["variable_name"].GetString()
        self.model_part = Model[settings["model_part_name"].GetString()]

        self.set_minimum_height = settings["set_minimum_height"].GetBool()
        self.minimum_height = settings["minimum_height_value"].GetDouble()
        settings.RemoveValue("set_minimum_height")
        settings.RemoveValue("minimum_height_value")

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, settings)
class SetInitialWaterLevelProcess(KratosMultiphysics.Process):
    def __init__(self, Model, settings):

        KratosMultiphysics.Process.__init__(self)

        default_settings = KratosMultiphysics.Parameters("""
            {
                "mesh_id"              : 0,
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "variable_name"        : "HEIGHT",
                "constrained"          : false,
                "value"                : "1.0"
            }
            """)
        settings.ValidateAndAssignDefaults(default_settings)

        self.variable = settings["variable_name"].GetString()
        self.model_part = Model[settings["model_part_name"].GetString()]

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, settings)
        self.variables_utility = KratosShallow.ShallowWaterVariablesUtility(
            self.model_part)

    def ExecuteInitialize(self):
        self.process.ExecuteInitializeSolutionStep()
        if self.variable == "HEIGHT":
            self.variables_utility.ComputeFreeSurfaceElevation()
        elif self.variable == "FREE_SURFACE_ELEVATION":
            self.variables_utility.ComputeHeightFromFreeSurface()
Example #4
0
class SetTopographyProcess(KM.Process):
    def __init__(self, Model, settings):

        KM.Process.__init__(self)

        default_settings = KM.Parameters("""
            {
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "constrained"          : false,
                "value"                : "z"
            }
            """)
        settings.ValidateAndAssignDefaults(default_settings)
        settings.AddEmptyValue("variable_name").SetString("TOPOGRAPHY")

        self.model_part = Model[settings["model_part_name"].GetString()]

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, settings)

    def ExecuteInitialize(self):
        self.process.ExecuteInitializeSolutionStep()
        SW.ShallowWaterUtilities().FlipScalarVariable(SW.TOPOGRAPHY,
                                                      SW.BATHYMETRY,
                                                      self.model_part)
Example #5
0
    def __init__(self, Model, settings):

        KM.Process.__init__(self)

        default_settings = KM.Parameters("""
            {
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "constrained"          : false,
                "value"                : "z"
            }
            """)
        settings.ValidateAndAssignDefaults(default_settings)
        settings.AddEmptyValue("variable_name").SetString("TOPOGRAPHY")

        self.model_part = Model[settings["model_part_name"].GetString()]

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, settings)
    def ExecuteInitialize(self):
        model_part_name = self.settings["model_part_name"].GetString()
        model_part = self.model[model_part_name]

        skin_detection_settings = KM.Parameters()
        skin_detection_settings.AddValue("name_auxiliar_model_part", self.settings["auxiliary_model_part_name"])
        skin_detection_settings.AddValue("name_auxiliar_condition", self.settings["auxiliary_condition_name"])
        skin_detection_settings.AddValue("list_model_parts_to_assign_conditions", self.settings["skin_parts_to_exclude"])
        KM.SkinDetectionProcess2D(model_part, skin_detection_settings).Execute()

        skin_model_part_name = model_part_name + '.' + self.settings["auxiliary_model_part_name"].GetString()
        skin_model_part = self.model[skin_model_part_name]

        # We remove the new interface condition from the bondaries with other conditions
        for name in self.settings["skin_parts_to_exclude"].GetStringArray():
            skin_to_exclude = model_part_name + '.' + name
            self.model[skin_to_exclude].RemoveConditionsFromAllLevels(KM.INTERFACE)
            KM.VariableUtils().SetFlag(KM.INTERFACE, False, self.model[skin_to_exclude].Nodes)
        skin_model_part.RemoveNodes(KM.NOT_INTERFACE)

        # Here we exclude the interface which will has an outward flow
        if self.settings["allow_outwards_flow_on_land"].GetBool():
            dimension = 2
            KM.NormalCalculationUtils().CalculateOnSimplex(skin_model_part, dimension)
            KM.ComputeNodalGradientProcess(model_part, SW.TOPOGRAPHY, SW.TOPOGRAPHY_GRADIENT, KM.NODAL_AREA).Execute()
            SW.ShallowWaterUtilities().IdentifySolidBoundary(skin_model_part, self.settings["sea_water_level"].GetDouble(), KM.SOLID)
            skin_model_part.RemoveNodes(KM.NOT_SOLID)
            skin_model_part.RemoveConditionsFromAllLevels(KM.NOT_SOLID)
        else:
            KM.VariableUtils().SetFlag(KM.SOLID, True, skin_model_part.Nodes)
            KM.VariableUtils().SetFlag(KM.SOLID, True, skin_model_part.Conditions)

        self.processes = []

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        for variable in self.settings["scalar_variables_list"].GetStringArray():
            scalar_settings = KM.Parameters()
            scalar_settings.AddEmptyValue("model_part_name").SetString(skin_model_part_name)
            scalar_settings.AddEmptyValue("variable_name").SetString(variable)
            scalar_settings.AddValue("value", self.settings["scalar_value"])
            scalar_settings.AddValue("constrained", self.settings["scalar_constraint"])
            self.processes.append(AssignScalarVariableProcess(self.model, scalar_settings))

        from KratosMultiphysics.assign_vector_variable_process import AssignVectorVariableProcess
        for variable in self.settings["vector_variables_list"].GetStringArray():
            vector_settings = KM.Parameters()
            vector_settings.AddEmptyValue("model_part_name").SetString(skin_model_part_name)
            vector_settings.AddEmptyValue("variable_name").SetString(variable)
            vector_settings.AddValue("value", self.settings["vector_value"])
            vector_settings.AddValue("constrained", self.settings["vector_constraint"])
            self.processes.append(AssignVectorVariableProcess(self.model, vector_settings))
    def __init__(self, Model, settings):

        KratosMultiphysics.Process.__init__(self)

        default_settings = KratosMultiphysics.Parameters("""
            {
                "mesh_id"              : 0,
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "variable_name"        : "HEIGHT",
                "constrained"          : false,
                "value"                : "1.0"
            }
            """)
        settings.ValidateAndAssignDefaults(default_settings)

        self.variable = settings["variable_name"].GetString()
        self.model_part = Model[settings["model_part_name"].GetString()]

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, settings)
        self.variables_utility = KratosShallow.ShallowWaterVariablesUtility(
            self.model_part)
Example #8
0
class SetInitialWaterLevelProcess(KM.Process):
    def __init__(self, Model, settings):

        KM.Process.__init__(self)

        default_settings = KM.Parameters("""
            {
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "variable_name"        : "HEIGHT",
                "constrained"          : false,
                "value"                : "1.0",
                "set_minimum_height"   : true,
                "minimum_height_value" : 1e-4
            }
            """)
        settings.ValidateAndAssignDefaults(default_settings)

        self.variable = settings["variable_name"].GetString()
        self.model_part = Model[settings["model_part_name"].GetString()]

        self.set_minimum_height = settings["set_minimum_height"].GetBool()
        self.minimum_height = settings["minimum_height_value"].GetDouble()
        settings.RemoveValue("set_minimum_height")
        settings.RemoveValue("minimum_height_value")

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, settings)

    def ExecuteInitialize(self):
        self.process.ExecuteInitializeSolutionStep()
        if self.variable == "HEIGHT":
            SW.ShallowWaterUtilities().ComputeFreeSurfaceElevation(
                self.model_part)
        elif self.variable == "FREE_SURFACE_ELEVATION":
            SW.ShallowWaterUtilities().ComputeHeightFromFreeSurface(
                self.model_part)

        if self.set_minimum_height:
            SW.ShallowWaterUtilities().SetMinimumValue(self.model_part,
                                                       SW.HEIGHT,
                                                       self.minimum_height)
            SW.ShallowWaterUtilities().ComputeFreeSurfaceElevation(
                self.model_part)
Example #9
0
class SetTopographyProcess(KM.Process):

    def __init__(self, Model, settings):

        KM.Process.__init__(self)

        default_settings = KM.Parameters("""
            {
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "constrained"          : false,
                "value"                : "z",
                "set_mesh_z_to_zero"   : true
            }
            """
            )
        settings.ValidateAndAssignDefaults(default_settings)
        settings.AddEmptyValue("variable_name").SetString("TOPOGRAPHY")

        self.model_part = Model[settings["model_part_name"].GetString()]
        self.depends_on_time = settings["value"].GetString().find('t') != -1
        self.set_mesh_z_to_zero = settings["set_mesh_z_to_zero"].GetBool()
        process_settings = settings.Clone()
        process_settings.RemoveValue("set_mesh_z_to_zero")

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, process_settings)

    def ExecuteInitialize(self):
        self.process.ExecuteInitializeSolutionStep()
        SW.ShallowWaterUtilities().FlipScalarVariable(SW.TOPOGRAPHY, SW.BATHYMETRY, self.model_part)
        if self.set_mesh_z_to_zero:
            SW.ShallowWaterUtilities().SetMeshZCoordinateToZero(self.model_part)
            SW.ShallowWaterUtilities().SetMeshZ0CoordinateToZero(self.model_part)

    def ExecuteInitializeSolutionStep(self):
        if self.depends_on_time:
            self.ExecuteInitialize()
Example #10
0
class SetBathymetryProcess(KratosMultiphysics.Process):
    def __init__(self, Model, settings):

        KratosMultiphysics.Process.__init__(self)

        default_settings = KratosMultiphysics.Parameters("""
            {
                "mesh_id"              : 0,
                "model_part_name"      : "please_specify_model_part_name",
                "interval"             : [0.0, 1e30],
                "variable_name"        : "BATHYMETRY",
                "constrained"          : false,
                "value"                : "z"
            }
            """)
        settings.ValidateAndAssignDefaults(default_settings)

        self.model_part = Model[settings["model_part_name"].GetString()]

        from KratosMultiphysics.assign_scalar_variable_process import AssignScalarVariableProcess
        self.process = AssignScalarVariableProcess(Model, settings)

    def ExecuteInitialize(self):
        self.process.ExecuteInitializeSolutionStep()
    def __init__(self, Model, settings ):

        KratosMultiphysics.Process.__init__(self)

        default_settings = KratosMultiphysics.Parameters("""
        {
            "mesh_id"            : 0,
            "model_part_name"    : "",
            "variable_name"      : "PRESSURE",
            "constrained"        : true,
            "value"              : 0.0,
            "interval"           : [0.0,"End"],
            "hydrostatic_outlet" : false,
            "h_top"              : 0.0
        }
        """)

        # Trick: allows "value" to be a double or a string value (otherwise the ValidateAndAssignDefaults might fail)
        if(settings.Has("value")):
            if(settings["value"].IsString()):
                default_settings["value"].SetString("0.0")

        settings.ValidateAndAssignDefaults(default_settings)

        # Set a Kratos parameters suitable for the core processes to set the PRESSURE
        pres_settings = settings.Clone()
        pres_settings.RemoveValue("hydrostatic_outlet")
        pres_settings.RemoveValue("h_top")

        # Create a copy of the PRESSURE settings to set the EXTERNAL_PRESSURE
        ext_pres_settings = pres_settings.Clone()
        ext_pres_settings["constrained"].SetBool(False)
        ext_pres_settings["variable_name"].SetString("EXTERNAL_PRESSURE")

        # Check the core processes input data
        if (pres_settings["model_part_name"].GetString() == ""):
            raise Exception("Empty outlet pressure model part name. Set a valid model part name.")
        elif (ext_pres_settings["model_part_name"].GetString() == ""):
            raise Exception("Empty outlet external pressure model part name. Set a valid model part name.")
        elif (pres_settings["variable_name"].GetString() != "PRESSURE"):
            raise Exception("Outlet pressure settings variable_name is not PRESSURE.")
        elif (ext_pres_settings["variable_name"].GetString() != "EXTERNAL_PRESSURE"):
            raise Exception("Outlet external pressure settings variable_name is not EXTERNAL_PRESSURE.")
        elif (pres_settings["value"].IsString()):
            if (pres_settings["value"].GetString == ""):
                raise Exception("Outlet pressure function sting is empty.")
        elif (ext_pres_settings["value"].IsString()):
            if (ext_pres_settings["value"].GetString == ""):
                raise Exception("Outlet external pressure function sting is empty.")

        self.hydrostatic_outlet = settings["hydrostatic_outlet"].GetBool()
        self.h_top = settings["h_top"].GetDouble()

        # Set the OUTLET flag in the outlet model part nodes and conditions
        self.outlet_model_part = Model[pres_settings["model_part_name"].GetString()]
        for node in self.outlet_model_part.Nodes:
            node.Set(KratosMultiphysics.OUTLET, True)
        for condition in self.outlet_model_part.Conditions:
            condition.Set(KratosMultiphysics.OUTLET, True)

        # Construct the base process AssignValueProcess
        self.aux_pressure_process = AssignScalarVariableProcess(Model, pres_settings)
        self.aux_external_pressure_process = AssignScalarVariableProcess(Model, ext_pres_settings)
class ApplyOutletProcess(KratosMultiphysics.Process):
    def __init__(self, Model, settings ):

        KratosMultiphysics.Process.__init__(self)

        default_settings = KratosMultiphysics.Parameters("""
        {
            "mesh_id"            : 0,
            "model_part_name"    : "",
            "variable_name"      : "PRESSURE",
            "constrained"        : true,
            "value"              : 0.0,
            "interval"           : [0.0,"End"],
            "hydrostatic_outlet" : false,
            "h_top"              : 0.0
        }
        """)

        # Trick: allows "value" to be a double or a string value (otherwise the ValidateAndAssignDefaults might fail)
        if(settings.Has("value")):
            if(settings["value"].IsString()):
                default_settings["value"].SetString("0.0")

        settings.ValidateAndAssignDefaults(default_settings)

        # Set a Kratos parameters suitable for the core processes to set the PRESSURE
        pres_settings = settings.Clone()
        pres_settings.RemoveValue("hydrostatic_outlet")
        pres_settings.RemoveValue("h_top")

        # Create a copy of the PRESSURE settings to set the EXTERNAL_PRESSURE
        ext_pres_settings = pres_settings.Clone()
        ext_pres_settings["constrained"].SetBool(False)
        ext_pres_settings["variable_name"].SetString("EXTERNAL_PRESSURE")

        # Check the core processes input data
        if (pres_settings["model_part_name"].GetString() == ""):
            raise Exception("Empty outlet pressure model part name. Set a valid model part name.")
        elif (ext_pres_settings["model_part_name"].GetString() == ""):
            raise Exception("Empty outlet external pressure model part name. Set a valid model part name.")
        elif (pres_settings["variable_name"].GetString() != "PRESSURE"):
            raise Exception("Outlet pressure settings variable_name is not PRESSURE.")
        elif (ext_pres_settings["variable_name"].GetString() != "EXTERNAL_PRESSURE"):
            raise Exception("Outlet external pressure settings variable_name is not EXTERNAL_PRESSURE.")
        elif (pres_settings["value"].IsString()):
            if (pres_settings["value"].GetString == ""):
                raise Exception("Outlet pressure function sting is empty.")
        elif (ext_pres_settings["value"].IsString()):
            if (ext_pres_settings["value"].GetString == ""):
                raise Exception("Outlet external pressure function sting is empty.")

        self.hydrostatic_outlet = settings["hydrostatic_outlet"].GetBool()
        self.h_top = settings["h_top"].GetDouble()

        # Set the OUTLET flag in the outlet model part nodes and conditions
        self.outlet_model_part = Model[pres_settings["model_part_name"].GetString()]
        for node in self.outlet_model_part.Nodes:
            node.Set(KratosMultiphysics.OUTLET, True)
        for condition in self.outlet_model_part.Conditions:
            condition.Set(KratosMultiphysics.OUTLET, True)

        # Construct the base process AssignValueProcess
        self.aux_pressure_process = AssignScalarVariableProcess(Model, pres_settings)
        self.aux_external_pressure_process = AssignScalarVariableProcess(Model, ext_pres_settings)


    def ExecuteInitializeSolutionStep(self):
        # Call the base process ExecuteInitializeSolutionStep()
        self.aux_pressure_process.ExecuteInitializeSolutionStep()
        self.aux_external_pressure_process.ExecuteInitializeSolutionStep()

        # If considered, add the hydrostatic component to the outlet pressure
        if (self.hydrostatic_outlet):
            self._AddOutletHydrostaticComponent()

        # Compute the outlet average velocity
        self._ComputeOutletCharacteristicVelocity()


    def ExecuteFinalizeSolutionStep(self):
        # Call the base process ExecuteFinalizeSolutionStep()
        self.aux_pressure_process.ExecuteFinalizeSolutionStep()
        self.aux_external_pressure_process.ExecuteFinalizeSolutionStep()


    # Private methods section
    def _AddOutletHydrostaticComponent(self):
        # Initialize body force value (avoid segfault in MPI if the local mesh has no outlet nodes)
        body_force = KratosMultiphysics.Vector(3)
        body_force[0] = 0.0
        body_force[1] = 0.0
        body_force[2] = 0.0

        # Get the body force value
        for node in self.outlet_model_part.Nodes:
            body_force = node.GetSolutionStepValue(KratosMultiphysics.BODY_FORCE, 0)
            break

        # Compute the body force unit normal vector
        body_force_norm = math.sqrt(body_force[0]*body_force[0] + body_force[1]*body_force[1] + body_force[2]*body_force[2])    # Body force norm
        body_force_dir = (1/(body_force_norm+1e-10))*body_force                                                                 # Body force unit director vector

        # Compute the minimum body force projection value (reference value)
        min_proj = 0.0
        for node in self.outlet_model_part.Nodes:
            body_force_proj = body_force_dir[0]*node.X + body_force_dir[1]*node.Y + body_force_dir[2]*node.Z    # Iteration node body force projection
            min_proj = min(min_proj, body_force_proj)

        # Add the hydrostatic component to the current PRESSURE and EXTERNAL_PRESSURE values
        for node in self.outlet_model_part.Nodes:
            body_force_proj = body_force_dir[0]*node.X + body_force_dir[1]*node.Y + body_force_dir[2]*node.Z    # Iteration node body force projection
            rho = node.GetSolutionStepValue(KratosMultiphysics.DENSITY, 0)                                      # Nodal density value
            hyd_pres = rho*body_force_norm*(self.h_top + (body_force_proj-min_proj))                            # Iteration node hydrostatic pressure
            cur_pres = node.GetSolutionStepValue(KratosMultiphysics.EXTERNAL_PRESSURE, 0)                       # Iteration node imposed external pressure

            node.SetSolutionStepValue(KratosMultiphysics.PRESSURE, 0, hyd_pres+cur_pres)                        # Add the hydrostatic component to the PRESSURE value
            node.SetSolutionStepValue(KratosMultiphysics.EXTERNAL_PRESSURE, 0, hyd_pres+cur_pres)               # Add the hydrostatic component to the EXTERNAL_PRESSURE value


    def _ComputeOutletCharacteristicVelocity(self):
        # Compute the outlet average velocity
        outlet_avg_vel_norm = 0.0
        for node in self.outlet_model_part.GetCommunicator().LocalMesh().Nodes:
            vnode = node.GetSolutionStepValue(KratosMultiphysics.VELOCITY)
            outlet_avg_vel_norm += math.sqrt(vnode[0]*vnode[0] + vnode[1]*vnode[1] + vnode[2]*vnode[2])
        comm = self.outlet_model_part.GetCommunicator().GetDataCommunicator()
        outlet_avg_vel_norm = comm.SumAll(outlet_avg_vel_norm)

        tot_len = len(self.outlet_model_part.GetCommunicator().LocalMesh().Nodes)   # Partition outlet model part number of nodes
        tot_len = comm.SumAll(tot_len)                                              # Get the total outlet model part nodes

        outlet_avg_vel_norm /= tot_len

        # Store the average velocity in the ProcessInfo to be used in the outlet inflow prevention condition
        min_outlet_avg_vel_norm = 1.0
        if (outlet_avg_vel_norm >= min_outlet_avg_vel_norm):
            self.outlet_model_part.ProcessInfo[KratosFluid.CHARACTERISTIC_VELOCITY] = outlet_avg_vel_norm
        else:
            self.outlet_model_part.ProcessInfo[KratosFluid.CHARACTERISTIC_VELOCITY] = min_outlet_avg_vel_norm
Example #13
0
    def ModifyInitialProperties(self):
        # ################################################################
        # #                      HEAT FLUX PROPERTY                      #
        ##################################################################
        self.processes = []

        HeatFlux1 = -700.0
        heatFluxSettings1 = KratosMultiphysics.Parameters("""
            {
                "model_part_name"             : "ThermalModelPart.HeatFlux2D_Top_Wall",
                "variable_name"               : "FACE_HEAT_FLUX",
                "constrained"                 : true,
                "interval"                    : [0.0,"End"]
            }
            """)
        heatFluxSettings1.AddEmptyValue("value").SetDouble(HeatFlux1)
        self.processes.append(
            AssignScalarVariableProcess(self.model, heatFluxSettings1))

        HeatFlux2 = 700.0
        heatFluxSettings2 = KratosMultiphysics.Parameters("""
            {
                "model_part_name"             : "ThermalModelPart.HeatFlux2D_Bottom_Wall",
                "variable_name"               : "FACE_HEAT_FLUX",
                "constrained"                 : true,
                "interval"                    : [0.0,"End"]
            }
            """)
        heatFluxSettings2.AddEmptyValue("value").SetDouble(HeatFlux2)
        self.processes.append(
            AssignScalarVariableProcess(self.model, heatFluxSettings2))

        ################################################################
        #                     TEMPERATURE PROPERTY                     #
        ################################################################
        ImposedTemperature = 90
        TemperatureSettings = KratosMultiphysics.Parameters("""
            {
                "model_part_name"             : "ThermalModelPart.ImposedTemperature2D_Left_Wall",
                "variable_name"               : "TEMPERATURE",
                "constrained"                 : true,
                "interval"                    : [0.0,"End"]
            }
            """)
        TemperatureSettings.AddEmptyValue("value").SetDouble(
            ImposedTemperature)
        self.processes.append(
            AssignScalarVariableProcess(self.model, TemperatureSettings))
        ################################################################

        # ################################################################
        # #                      RADIATION PROPERTY                      #
        # ################################################################

        RadiationSettings = KratosMultiphysics.Parameters("""
            {
                "model_part_name": "ThermalModelPart.ThermalFace2D_Right_Wall",
                "add_ambient_radiation": true,
                "emissivity": 0.8,
                "add_ambient_convection": true,
                "convection_coefficient": 100.0
            }
            """)

        AmbientTemperature = 12.0
        RadiationSettings.AddEmptyValue("ambient_temperature").SetDouble(
            AmbientTemperature)
        self.processes.append(
            ApplyThermalFaceProcess(self.model, RadiationSettings))
        ################################################################
        for process in self.processes:
            process.ExecuteBeforeSolutionLoop()