Dear colleagues! Many thanks for the help!
The final solution looks like this.
In this code, the name “abc” is defined for component 0 of the dataset S_bot. Here the vtk_index is the index of the numerical data array in the VTK object S_bot (this index may be different in different VTK objects)
Below is an example of renaming many components using a function in a newly created dataset
input0 = inputs[0]
vtk_index = 1
# Creating a new dataset from an existing one. Multiplying by zero
# provides a deep copy of the VTK object and initialization with zeros
S_bot = input0.CellData['Mxx,Myy,Mxy,M1,M2'] * 0
pass # Various calculations inside an array S_bot.Arrays[vtk_index]
def SetComponentNames_Stresses(vtk_dataset):
names = ['Sxx', 'Syy', 'Sxy', 'Sxz', 'Syz', 'S1', 'S2', 'S3', 'p', 'q', 'I1', 'sqrtJ2']
for i in range(len(names)):
vtk_dataset.Arrays[vtk_index].VTKObject.SetComponentName(i, names[i])
output.CellData.append(S_bot, "S_bot")
SetComponentNames_Stresses(output.CellData['S_bot'])