# Field3D.compute\_kinetic\_energy

[![badge](https://img.shields.io/badge/Source%20Code-06D40C?style=plastic)](https://github.com/LorenzoPiu/aPriori/blob/main/src/aPriori/DNS.py#L435-L470)

### **Field3D.**<mark style="color:red;">compute\_kinetic\_energy</mark>(self):

***

### Description

Computes the kinetic energy of the velocity field.

This function calculates the kinetic energy of the velocity field. The closure model is determined based on the filter size: if the filter size is 1, DNS (Direct Numerical Simulation) is assumed; otherwise, LES (Large Eddy Simulation) is assumed. The function checks if the attribute `Kappa_DNS` or `Kappa_LES` exists and uses its value if available. If not, it computes the kinetic energy using the `U_X`, `U_Y`, and `U_Z` components of the velocity field.

The computed kinetic energy is saved to a file, and the object's state is updated after the computation.

### Parameters

* `self` (object): The object instance containing the velocity field components and other relevant attributes.

### Returns

None
