Main Content

thermalIC

(To be removed) Set initial conditions or initial guess for a thermal model

thermalIC will be removed. Use cellIC, faceIC, edgeIC, and vertexIC instead. (since R2023a) For more information on updating your code, see Version History.

Description

thermalIC(thermalmodel,T0) sets initial temperature or initial guess for temperature to the entire geometry.

example

thermalIC(thermalmodel,T0,RegionType,RegionID) sets initial temperature or initial guess for temperature to a particular geometry region.

thermalIC(thermalmodel,Tresults) sets initial temperature or initial guess for temperature using the solution Tresults from a previous thermal analysis on the same geometry and mesh. If Tresults is obtained by solving a transient thermal problem, thermalIC uses the solution Tresults for the last time-step.

thermalIC(thermalmodel,Tresults,iT) sets initial temperature or initial guess for temperature using the solution Tresults for the time-step iT from a previous thermal analysis on the same geometry and mesh.

thermalIC = thermalIC(___), for any previous syntax, returns a handle to the thermal initial conditions object.

Examples

collapse all

Create a thermal model, import geometry, and set the initial temperature to 0 on the entire geometry.

thermalModel = createpde("thermal","transient");
geometryFromEdges(thermalModel,@lshapeg);
thermalIC(thermalModel,0)
ans = 
  GeometricThermalICs with properties:

            RegionType: 'face'
              RegionID: [1 2 3]
    InitialTemperature: 0

Input Arguments

collapse all

Thermal model, specified as a ThermalModel object. The model contains the geometry, mesh, thermal properties of the material, internal heat source, boundary conditions, and initial conditions.

Example: thermalmodel = createpde("thermal","steadystate")

Initial temperature or initial guess for temperature, specified as a number or a function handle. Use a function handle to specify spatially varying initial temperature. For details, see More About.

Data Types: double | function_handle

Geometric region type, specified as "Vertex", "Edge", "Face", or "Cell" for a 3-D model. For a 2-D model, use "Vertex", "Edge", or "Face".

Example: thermalIC(thermalmodel,10,"Face",1)

Data Types: char | string

Geometric region ID, specified as a vector of positive integers. Find the region IDs by using pdegplot.

Example: thermalIC(thermalmodel,10,"Edge",2:5)

Data Types: double

Thermal model solution, specified as a SteadyStateThermalResults or TransientThermalResults object. Create Tresults by using solve.

Time index, specified as a positive integer.

Example: thermalIC(thermalmodel,Tresults,21)

Data Types: double

Output Arguments

collapse all

Handle to initial condition, returned as a GeometricThermalICs or NodalThermalICs object. See GeometricThermalICs Properties and NodalThermalICs Properties.

thermalIC associates the thermal initial condition with the geometric region in the case of a geometric assignment, or the nodes in the case of a results-based assignment.

More About

collapse all

Version History

Introduced in R2017a

collapse all