Simulating a Single Battery Cell Using the MSMD Battery Model in ANSYS Fluent

M4qXj7pcOFwcFoN3RC6Vo0Dfo6XltfVkriCjQkIc8jH 6LGCR0fCxGHG7GLdNIjBOa0Yc odeH8GtnaRdw9Wmt9oF 63cc uBc7nRYaTOX3 Y S2tSXJ2FKBlLS2Ghg42MLsY08zHFAJTLMa zawlQ

Overview

The energy industry includes the production and sale of energy such as electricity, oil and gas, and batteries. Rescale offers big compute and AI/ML solutions for the toughest problems in oil and gas discovery and renewable energy production. 

This tutorial demonstrates how to set up a lithium-ion battery cell simulation using the MSMD battery model in ANSYS Fluent and how to calculate voltage and temperature of the battery for different discharge rates. A lithium-ion battery is a rechargeable battery that has lithium-ions as the main component of its biochemistry. Lithium-ion batteries are considered good for the environment due to containing less toxic materials than other batteries which means they are considered non-hazardous waste. 

The MSMD, also known as multi-scale multi-domain, battery model is used to analyze the discharge of lithium-ion batteries through connecting the physics of batteries and battery discharge, safety, and thermal control efficiently. A battery discharge rate is the amount of current that can be taken from a battery that has a defined capacity over a certain period of time. For example, a 2C rate means that the discharge current will discharge the entire battery in two hours. 

A possible application for this tutorial could be to see how different battery discharge rates specifically affect the battery life and impact the environment (ex. A general inference is that lower discharge rate could lead to a shorter battery life, leading to more lithium-ion batteries being bought, sold, and used, leading to greater environmental impacts). Rescale’s powerful cloud computing platform allows you to generate these calculations quickly and efficiently to come to a conclusion. 

This tutorial will take less than 15 minutes to complete from start to finish, and will generate six output files. Alternatively, you can also click the Get Job Results button below, and review the full setup and results for the job immediately. 

This tutorial was taken from the ANSYS Fluent Tutorial Guide 2022 R2, Chapter 29.1, 29.2, 29.3, 29.4.3.6: Simulating a Single Battery Cell Using the MSMD Battery Model

Video Tutorial

Configuring Your Job

Starting Up Rescale

  1. To start using Rescale, go to platform.rescale.com and sign up or log in using your account information. Using Rescale requires no download or implementation of additional software. Rescale is browser-based, which allows you to securely access your analyses from your work station or from your home computer.
  2. From the main screen of the platform, click on the + Create New Job button at the top left corner of your screen. This will take you to a job Setup page.

There are now five Setup stages to complete.

Setup: Inputs

First, you need to give the job a name. Since Rescale saves all of your jobs, we recommend you to choose a unique name that will help you to identify it later. To change the name of your project, click on the pencil next to the current job name in the top left corner of the window. 

Next, download the battery cell case file and the journal file. The battery cell case file contains all of the steps that a user would have needed to take if they were using ANSYS Fluent on their local computer and simulating the lithium-ion battery and its discharge rates. The journal file contains command lines that help execute the case file’s steps in order to get to the output. 

Then, upload the battery cell case file and journal file by clicking on the Upload from this computer button.

Dvc6AZXOHnjuswhUryBZ6yvxqnw8yq5UjSXFEKhu3DanF o4CUsCKn7CgsHCCi3yCUKk27brmk3NgfNSw4oua8r4GmeE5aGSAKtEChqT3qsj0OtGP30hn3ot2hfZehaMdjBsIqKf1C0SWmP h

On completion of this step, the Inputs setup page should look like that shown below:

0ATc vy7N2e FbyczBn4ncOT5Wpk8ucIGGWzrLnXhRnfvIHDGFhPMF9iCmE4oOg2PkYZNNsU

Click Next to move onto the Software Settings section of the Setup. Now, you need to select the software module you want to use for your analysis. You can scroll down or use the search bar to search for a software. For this demo, scroll down and click ANSYS Fluent.

Next, the Analysis Options must be set: 

  • The drop-down selector allows users to choose their preferred version of ANSYS Fluent. 
  • The input files used in this tutorial were tested with ANSYS Fluent version 2022 R2, so select that option.

Once the above step is completed, you need to add the analysis execution command for your project. This is a command specific for each software package and each input file being used. For these input files and ANSYS Fluent, the execution command is shown below:

fluent 3ddp -gu -ssh -cnf=$FLUENT_HOSTS -t$RESCALE_CORES_PER_SLOT -i run_plot.jou

Lastly, the License Options must be set: 

  • There are two options:
    • Choose On-Demand License
    • Use Existing License

In this case, select Choose On-Demand License.

  • For the Software Provider drop down menu under Choose On-Demand License, select Rescale
  • Then, click the box confirming you accept the terms and conditions of the software license.

On completion, the Software Settings page should look like that below: 

Fe7XWoBHE0lDg1 4l1Y0iHShDlLS8LVwia1CI YgssHHGLNPjdwZlxshiqZOaSxkH

pVp SXs2ezOhKZQC36GnpmU fCZCOxy gDwtURH zjhtUvSwgTuL IB2MOTLXZ m7bdAFHIaH lfkbO JzCqkefZJlZ MAY99KiKpkC0 g4IgStyZJhs4akbLsIRmv6Y2dw9Nq4ie9cFRMiZJJ f vo

Setup: Hardware Settings

Now that you have chosen the analysis code you want to use, the next step is to select the desired computing hardware for the job. Click on the Hardware Settings icon.

  • On this page, you must select your desired Core Type and how many cores you want to use for this job. A “core” is a virtualized computing unit, with each core representing a single core from a physical computer. For this demo, select Emerald On-Demand Priority. For a more thorough explanation on why Emerald On-Demand Priority was selected, please refer to the Performance Profiles part of the Further (Optional) Steps section below. 
  • The Number of Cores should be set to 8.
  • The Walltime is how long you want the job to run until it automatically stops. Keep in mind that once a job is stopped (either by the walltime running out or by clicking the red Stop button in the upper right hand corner of the screen), it cannot be restarted. You want to choose a reasonable amount of time that allows you to complete the job and for the job to produce all of the desired output files while balancing the monetary cost of running the simulation for too long. For this job, set the walltime to 2 hours. 

Your Hardware Settings screen should look like this:

5ecvgnMttwvpO ahQr 4rPwZymCkAOtitAmgIB9vkn9OHK I3cdCM8VgpaCyMZZR5q UnfSlN6ccWVu91mYg8DdXxpuH6jsFbfHmOaJUHEr6q9j 1lmNl8dUbKi7UUqn

Setup: Post Processing

Move on to the Post Processing screen by clicking the Post Processing icon. For this tutorial, we will not need post processing, so hit the Next button at the bottom right hand corner of the screen to proceed to Review.

qX jcsATWWt1ziDQcf9ioW5eeheCtu5PSv6S 8 pszs4qJqYEnCdq GxlrETv4XjF5pQD1YPwD3LzgcfNfVou03SuU2zyZ0TKCKOLtr5iWCgOkUvoXB5FmQx 6f1wwNJ1H V3G QGq4ZN3 On6nwIA

Setup: Review

Finally, move to the Review stage of Setup and check that the setup is correct by reviewing the table. It should look like that below: 

SscNZfWSX1vvXPH38gEx5DElQD 85FwYErOVAkb9KNdlbNQr

Now, hit the Submit button in the upper right hand corner of the screen.

Status

Now you can monitor the progress of your job from the Status tab. To run your job, Rescale boots the cluster as you defined it, runs the simulation, and shuts down the cluster immediately upon completion. The entire process is completely automated and secure, and requires no further input from the user. The whole analysis should take less than fifteen minutes.

The Status window will look like that shown below:

Results

The Results tab shows all the resulting files that are associated with your job. Given that some analyses result in many output files, Rescale gives you the option to download all files simultaneously or individually as needed.

As the job is completed, the results show up on this page. Click Refresh Results to show all of the completed results, and then click Download to download your files. Note that if you click Download before the Status page shows Cluster stopped in the Job Log section, then you may download a zip file containing data for only some part of the job. 

Here is a screenshot of the Results page after the job is done running; information for each individual run was added to the table as they were completed:

XaY HL98KCTZMbDsp3MFyjy9P3nD2FNgJjXtSnkbrUA zA1AQ0P8x1wwEXiodszW9vgyyxP4V2BVEGt578q7QKUnSsz U I8nyt9 JbwgXzzGyGcB4NCQ1GzuFWoGrmdtbYO19Rj5VZezY1 GbJ 0

As you can see, the input files that were attached in the Inputs setup stage are included in the Results tab as well in case you wanted to redownload them or attach them to another job. 

The two output files that contain the variables and data points for the voltage vs. flow-time and maximum temperature vs flow-time graphs are ntgk-1c.out and max-temp-1c.out, respectively.

Graphs and Interpretation of Graphs

Here are what the voltage vs. flow-time and maximum temperature vs flow-time graphs look like if you decide to plot them. 

The voltage vs. flow-time graph shows that as flow time increases, voltage of the lithium-ion battery slowly decreases.

qLFjcc8OxDHZp EkIo3cR2ck0 RbSNd3ODHydTLWNtOJV8EQfpcaQHBsM6BfZceJ8GQH0Jz2xIN6pJ7Gr71URwdORKOH 9OgkLyLu

The maximum-temperature vs. flow-time graph shows that as flow-time increases, maximum temperature increases as well into an eventual plateau.

Further Steps (Optional)

Here are some optional steps that you can do to take this tutorial one step further.

Post-Processing

To post-process the output files and create contour plots of the lithium-ion battery, continue to Chapter 29.4.4 in the ANSYS Fluent Tutorial Guide 2022/R2, save the case file to your local computer, and either directly see the plots in ANSYS Fluent or create a new job and upload the new case file as an input and follow similar setup stages as that above.

Optimizing Workflow Performance and/or Cost

In order to see a cost vs. time to solve graph of varying coretypes for your job, first completely run the job and then click on the Performance icon at the top of the main screen of the Rescale platform. The performance profile will help you decide which hardware is the best for your job by viewing how long it takes for the job to complete and the cost for each hardware you select. 

Like a Rescale Job, you want to give the performance profile a unique name because Rescale saves all of the jobs and performance profiles that you do. To change the name of your project, click on the pencil next to the current job name in the top left corner of the window. 

Next, click on Select Configuration near the middle right. When the side icon pops up, click on Jobs and then select the Simulating a Single Battery Cell Using the MSMD Battery Model in ANSYS Fluent job by clicking Create from Job

To select and compare hardware, click on the +Add button under the Hardware Benchmark Runs table. You can even change the number of cores that the hardware runs on. 

Screen Shot 2022 08 15 at 2.38.11 PM

The selected hardware will pop up in the Hardware Benchmark Runs table. 

Once done selecting all of the desired hardware to compare, click on the blue Run button at the top right of the Hardware Benchmark Runs:

The job will be run concurrently with each different hardware. Once the performance profile is completely done running, the Cost vs. Time to Solve Chart will pop up in which you can analyze which hardware is the best for your job in terms of your values.

tdQR0g VH4BzoUeE9yxVzowiwbaxL2MpNfwJvgRt9fJzTh Qtj7LEkUeNLabohyMYgN9Mzk91TbukoGstxXnhzPXPO0NQYLULQXR3q9X3mrq0d9qVr02MoEn8fQGZ43Nneh6y

As you can see, the job takes under 7 minutes to run on each hardware. This showcases Rescale’s powerful and efficient computational platform. If you value time to solve over cost, then the Granite hardware at 2 cores would be best. If you value cost over time to solve, then Starlite at 1 core, Emerald On-Demand Priority at 1 core, and Ruby at 1 core would all be tied at the best. Emerald On-Demand Priority was chosen for this tutorial based on its low cost and moderate time-to-complete efficiency. It was also the default for the hardware selection. Performance profiles can help you make an active decision on which hardware and number of cores to use when completing a job according to your values and motivations.

Conclusion

This tutorial shows you how to simulate a lithium-ion battery and test its maximum temperature and voltage against different discharge rates using the software ANSYS Fluent. In the future, you can use the generated output files and create graphs from the designated variables and data points. Lithium-ion batteries are and have become increasingly popular because of their ability to recharge and battery life, creating a more sustainable planet.

In addition, Rescale helps simplify the setup of an otherwise lengthy tutorial. Instead of going through the tutorial step by step in ANSYS Fluent and clicking a different button or setting to create the output, Rescale simplifies the process by allowing you to attach a case file, attach a journal file of commands to execute the case file, choose the software and hardware to run the input files, and wait for the job to finish.

Once finished, Rescale populates the Results tab with all of the output files you need to post-process the job without ever having to download the files to your local computer. Completing the tutorial on Rescale helps you leverage high computing power, access to different types of hardware and software to test scalability and diversity for the same simple job.