Filter a 3D scalar field
Exercise 02
"""
Created on Fri May 24 12:00:20 2024
@author: lorenzo piu
"""Import and define array
>>> import aPrioriDNS.DNS as DNS
>>> from aPrioriDNS.DNS import Scalar3D>>> shape = [4, 2, 4]
>>> array = np.ones(shape)
>>> array[2:3, :, 2:3] = 2
>>> print(array)
[[[1. 1. 1. 1.]
[1. 1. 1. 1.]]
[[1. 1. 1. 1.]
[1. 1. 1. 1.]]
[[1. 1. 2. 1.]
[1. 1. 2. 1.]]
[[1. 1. 1. 1.]
[1. 1. 1. 1.]]]Filter 3D array
Define Temperature field as a Scalar3D object
Filter the scalar with a Gaussian filter
Filter the scalar with a Box filter
Last updated