-
-
Notifications
You must be signed in to change notification settings - Fork 164
Expand file tree
/
Copy pathvariables.py
More file actions
122 lines (110 loc) · 4.17 KB
/
Copy pathvariables.py
File metadata and controls
122 lines (110 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
scenario_name = "tendon-top-A"
# time parameters
# ---------------
dt_elasticity = 1 # [ms] time step width for elasticity
end_time = 20000 # [ms] simulation time
output_timestep_3D = 50 # [ms] output timestep
# setup
# -----
constant_body_force = (0, 0, -9.81e-4) # [cm/ms^2], gravity constant for the body force
force = 100.0 # [N] pulling force to the bottom
# input files
# -----------
import os
input_dir = os.environ.get('OPENDIHU_INPUT_DIR')
fiber_file = input_dir + "/left_biceps_brachii_tendon2a.bin"
cellml_file = input_dir + "/2020_06_03_hodgkin-huxley_shorten_ocallaghan_davidson_soboleva_2007.cellml"
precice_config_file = "../precice-config.xml"
# If the fiber geometry data should be loaded completely in the python
# script. If True, this reads the binary file and assigns the node
# positions in the config. If False, the C++ code will read the binary
# file and only extract the local node positions. This is more performant
# for highly parallel runs.
load_fiber_data = False
debug_output = False # verbose output in this python script, for debugging the domain decomposition
disable_firing_output = True # Disables the initial list of fiber firings on the console to save some console space
paraview_output = False # If the paraview output writer should be enabled
adios_output = False # If the MegaMol/ADIOS output writer should be enabled
python_output = False # If the Python output writer should be enabled
exfile_output = False # If the Exfile output writer should be enabled# material parameters
# material parameters
# --------------------
tendon_material = "nonLinear"
rho = 10
# solvers
# -------
diffusion_solver_type = "cg" # solver and preconditioner for the diffusion part of the Monodomain equation
diffusion_preconditioner_type = "none" # preconditioner
# solver and preconditioner for an initial Laplace flow on the domain, from which fiber directions are determined
potential_flow_solver_type = "gmres"
potential_flow_preconditioner_type = "none" # preconditioner
# solver and preconditioner for the 3D static Bidomain equation that solves the intra-muscular EMG signal
emg_solver_type = "cg"
emg_preconditioner_type = "none" # preconditioner
emg_initial_guess_nonzero = False # < If the initial guess for the emg linear system should be set to the previous solution
# partitioning
# ------------
# this has to match the total number of processes
n_subdomains_x = 1
n_subdomains_y = 1
n_subdomains_z = 1
# stride for sampling the 3D elements from the fiber data
# here any number is possible
sampling_stride_x = 2
sampling_stride_y = 2
sampling_stride_z = 50
mapping_tolerance = 0.1
# further internal variables that will be set by the helper.py script and used in the config in settings_fibers_emg.py
n_fibers_total = None
n_subdomains_xy = None
own_subdomain_coordinate_x = None
own_subdomain_coordinate_y = None
own_subdomain_coordinate_z = None
n_fibers_x = None
n_fibers_y = None
n_points_whole_fiber = None
n_points_3D_mesh_global_x = None
n_points_3D_mesh_global_y = None
n_points_3D_mesh_global_z = None
output_writer_fibers = None
output_writer_emg = None
output_writer_0D_states = None
states_output = False
parameters_used_as_algebraic = None
parameters_used_as_constant = None
parameters_initial_values = None
output_algebraic_index = None
output_state_index = None
nodal_stimulation_current = None
fiber_file_handle = None
fibers = None
fiber_distribution = None
firing_times = None
n_fibers_per_subdomain_x = None
n_fibers_per_subdomain_y = None
n_points_per_subdomain_z = None
z_point_index_start = None
z_point_index_end = None
meshes = None
potential_flow_dirichlet_bc = None
elasticity_dirichlet_bc = None
elasticity_neumann_bc = None
fibers_on_own_rank = None
n_fiber_nodes_on_subdomain = None
fiber_start_node_no = None
generate_linear_3d_mesh = False
generate_quadratic_3d_mesh = True
nx = None
ny = None
nz = None
constant_body_force = None
bottom_traction = None
n_subdomains_x = 1
n_subdomains_y = 1
n_subdomains_z = 1
states_initial_values = []
enable_coupling = True
enable_force_length_relation = True
lambda_dot_scaling_factor = 1
mappings = None
vm_value_stimulated = None