# Simcenter STAR-CCM+ How Can I Define a Time Varying Solid Density?

2022-11-22T13:58:21.000-0500
Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter Cloud HPC Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

## Summary

A time varying solid density can be defined using a User Defined Equation of State and an energy sink

## Details

 Attachments: VariableDensitySolid_1702_rev1.sim (1 MB)
Modelling time varying solid density is sometimes necessary, for example when modelling battery thermal runaway events, the cells lose mass through venting and in this case it may be useful to take this into account by reducing the solid cell density over time.
The attached example shows how this can be done, which requires 2 key elements:
1. the solid density must be defined using user defined equation of state
2. an energy sink must be added to the solid region to compensate for the change of mass
In this example we have 2 solid regions, each losing mass at a different rate:

The mass loss per time step is simply:

And the cumulative mass loss over time can be calculated using a sum report:

The solid density can then be modelled using a field function, taking care to apply the correct mass loss to each part:

The density of the individual parts can then be seen changing over time:

This alone is not sufficient however, as Simcenter STAR-CCM+ conserves energy: mass*specific energy is conserved, so a decrease in mass would result in a specific energy increase, which would ultimately result in a  temperature increase.
As in this case we are modelling a mass loss, we also need to include in the model the energy loss associated with the mass loss. This can be done by adding a total heat source to the solid region, defined using a field function and applying on a per-part basis:

where the _energySink field function is defined as the mass loss rate times the volume average total energy  for that part (from a report), again on a per-part basis. Please note that the use of volume average total energy is valid when the specific heat (Cp) is constant.

In this adiabatic case the solid temperature remains in fact constant:

Please note that Simcenter STAR-CCM+ v2022.1 or later is needed to open this example.

SummaryDetails

### Associated Components

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+