ModuleAssembly
Description
Use ModuleAssembly to create a module assembly object that
      represents a number of Module objects
      connected electrically in series or in parallel. You can use this object as an input to the
        Pack object to
      create larger battery models.
To generate a Simscape™ model of your ModuleAssembly object, use the buildBattery
      function.
The ModuleAssembly object only supports the definition of structural or
      design parameters. You can modify the run-time parameters for this object and its constituent
      module models after you create the model. The ModuleAssembly object keeps
      track of its unique constituent module models and generates parameters for these models
      instead of doing it for every model instance. You can generate a script that contains all the
      parameters of the ModuleAssembly object by specifying the
        MaskParameters argument in the buildBattery
      function. A unique module model is characterized by having the same properties (such as
        NumSeriesAssemblies and ModelResolution) and the
      same constituent cell properties (such as name, format, and weight).
The ModuleAssembly object is the fourth element stage of a battery pack
      system model in a bottom-up approach. Pack models are required for architecture evaluation in
      early development stages, software and hardware development, system integration and
      requirement evaluation, cooling system design, control strategy development
      hardware-in-the-loop, and many more applications.

To specify the number and attributes of the modules, use the Module
      property.
This figure shows a module assembly that comprises two modules made of four parallel assemblies of 48 parallel cylindrical cells each.

Thermal Boundary Conditions
Thermal boundary conditions define the specific heat transfer mechanisms that occur at each interface of a cell thermal model and its surroundings. In battery systems, cells are typically thermally coupled to different heat sources and sinks, all of which have an effect on the battery cell temperature. The number and type of thermal boundary conditions for a cell model depends on the thermal and mechanical design of the battery system.
For example, you can place cells on an aluminium cooling plate to enhance heat removal and, at the same time, join them together mechanically with a potting compound that effectively eliminates or decreases the inter-cell heat exchange path. The cell temperature has a direct impact on battery performance and lifetime. Therefore, it is crucial to predict this state in dynamic simulation.
Inside a battery object, you can set up a thermal network of lumped-thermal-mass cell models to simultaneously capture the thermal paths to the ambient, the coolant, and/or the cooling plate:

These options are not mutually exclusive. For example, your battery model can combine both the coolant thermal path and the cooling thermal plates to model individual thermal resistances between the individual cells and the sections of the cooling plate.
For more information about thermal paths, see the AmbientThermalPath, CoolantThermalPath, and CoolingPlate properties.
You can also model direct cell-to-cell heat exchange. This is important when you want to simulate more detailed thermal management strategies or even thermal propagation scenarios where inter-cell heat transfer happens at faster rates than ambient or coolant rates. In the battery industry, you can link battery cells to each other through many different means. For example, you can link cylindrical cells by using potting compounds for mechanical rigidity, stability, and thermal isolation, or other types of thermal interface materials. You can also use dielectric fluids or other compounds to heat or cool down cylindrical cells, as well as forced air convection.
You can define the thermal parameters for the inter-cell heat exchange after you create the battery model. You can find these parameters from first principles calculations and more detailed 3D simulations.

These options are not mutually exclusive.
For more information about inter-cell thermal paths, see the InterCellThermalPath and InterCellRadiativeThermalPath properties.
Creation
Description
Note
To quickly create a ModuleAssembly
          object, use the batteryModuleAssembly function. By using this function, you avoid importing
          the namespace, using the full class name, or dealing only with name-value arguments when
          creating the object. (since R2024a)
To use this object, at the MATLAB® Command Window, run this command at least once each MATLAB session:
import simscape.battery.builder.*;
batteryModuleAssembly = ModuleAssembly
batteryModuleAssembly = ModuleAssembly(Name=Value)
batteryModuleAssembly = ModuleAssembly(... Module=repmat(Module,1,2), ... StackingAxis="Y",... InterModuleGap=simscape.Value(0.005,"m"));
You can define the number and types of modules in the Module
          property. If your module assembly comprises many modules with the same property values,
          you can use the repmat function to specify the Module property.
          Otherwise, specify an array of distinct modules. 










