Create animation(.gif) by using the PyDPF.

please let me know can i able to create the animation for "transient Fluid simulation problems". i have fluent project file(.flprj)
when i try to create an animation for 100 timesteps i just getting first time step frame only.. but i need to create the animation .gif file for the timesteps from 1to 100.
i have been use the time scoping as well but still not getting what i required.
Anyone please provide any solution for this.
Comments
-
@Rajesh Meena please let me know by using DPF can i create the animation for all timesteps in transient simulations.
0 -
@Gopi Raju Velpula Since you have solution now. Please post it here.
1 -
@Rajesh Meena sure ...
I have made an animation (.gif) file for each time step in a transient simulation using the DPF code below.from ansys.dpf import core as dpf
model = dpf.Model('first.flprj')
mesh_scoping = dpf.mesh_scoping_factory.face_scoping(model.metadata.meshed_region.faces.scoping)
time_scoping = dpf.time_freq_scoping_factory.scoping_on_all_time_freqs(model)
mass_flow = model.results.mass_flow_rate
mass_flow = mass_flow.on_time_scoping(time_scoping)
mass_flow = mass_flow.on_mesh_scoping(mesh_scoping)
mass_flow_fields = mass_flow.eval()
print(mass_flow_fields)
cpos1 = [(0.5998,0.57,2.909656),(0.5998,0.57,0),(0,1,0)]
varying_scale_factor = [i for i in range(len(mass_flow_fields))]
print(varying_scale_factor)
mass_flow_fields.animate(show_scalar_bar=False,
save_as='tmp.gif',
framerate = 1,
quality = 8,
freq_kwargs={"font_size": 0},
cpos=cpos1,
off_screen = True,
show_axes = False
)1 -
@Gopi Raju Velpula any idea , how can we switch of the mesh from gif ?
0 -
Hello @Yogesh Bavge use "show_edges=False" it will switch of the mesh.
1