ANASEN_analysis/anasen_fem/run.py
Vignesh Sitaraman e407b9842e modified: anasen_fem/run.py added line sto archive the simulation files to save space.
modified:   anasen_fem/wires_gmsh2d_bc.py made it refine twice instead of doing a weighed refinement to get a faster runtime. The losses in precision aren't too bad.
2026-04-02 14:11:03 -04:00

26 lines
1.0 KiB
Python
Executable File

import code
import os
# val=-178.3
val=17.83
count=11
while val<178.3+0.1:
print(val)
os.system("python3 wires_gmsh2d_bc.py "+str(val))
os.system("ElmerGrid 14 2 wires2d.msh")
os.system("ElmerSolver wires2d.sif")
os.system("./paraview_plotter.py")
os.system("cp wires2d.msh wires2d/mesh_files/wires2d%02d_%1.4f.msh"%(count,val))
os.system("cp wires2d.sif wires2d/sif_files/wires2d_%02d_%1.4f.sif"%(count,val))
os.system("cp wires2d/elfield_anasen_t0001.vtu wires2d/vtu_files/elfield_anasen_%02d_%1.4f.vtu"%(count,val))
os.system("cp contour_output.png png/Contour_output_z_%02d_%1.4f.png"%(count,val))
os.system("cp Field_output.png png/Field_ouput_z_%02d_%1.4f.png"%(count,val))
val=val+17.83
count = count + 1
os.system("tar -cvzf wiress2d/mesh.tar.gz wires2d/mesh_files")
os.system("rm -rf wires2d/mesh_files/*")
os.system("tar -cvzf wires2d/sif.tar.gz wires2d/sif_files")
os.system("rm -rf wires2d/sif_files/*")
os.system("tar -cvzf wires2d/vtu.tar.gz wires2d/vtu_files")
os.system("rm -rf wires2d/vtu_files/*")