-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsimulation_series_oasis.py
More file actions
24 lines (19 loc) · 1010 Bytes
/
simulation_series_oasis.py
File metadata and controls
24 lines (19 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os
from fenics import *
from dolfin import *
# from mshr import *
if __name__ == "__main__":
T = 20 # final time
num_steps = 5000 # number of time steps
dt = T / num_steps # time step size
mu = 0.001 # dynamic viscosity
rho = 1 # density
directory = 'mesh/circle/'
for i in range(1):
mesh_file_name = 'circle_{}'.format(i)
mesh_directory = os.path.join(directory, 'las')
save_file_dir = 'solution/circle_{}_las'.format(i)
if not os.path.exists(save_file_dir):
os.makedirs(save_file_dir)
os.system('python NSfracStep.py problem=Cylinder meshname={} meshdir={} T={} dt={} output_timeseries_as_vector=False folder={}'.format(mesh_file_name, mesh_directory, T, dt, save_file_dir))
# os.system('python NSfracStep.py problem=LaminarChannel meshname={} meshdir={} T={} dt={} output_timeseries_as_vector=False folder={}'.format(mesh_file_name, mesh_directory, T, dt, save_file_dir))