Compare commits

...

2 Commits

Author SHA1 Message Date
jeremias
d7f4709593 update 2021-06-09 12:35:12 +02:00
jeremias
ec76080839 clean up 2021-05-28 10:01:29 +02:00
15 changed files with 413 additions and 355 deletions

View File

@ -52,16 +52,31 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
inputfile = yaml.full_load(file)
true_values = {
3: 2400,
4: 4200,
5: 11000,
6: 7800,
2: 100
3: 4800,
4: 7200,
5: 11520,
6: 11520,
2: 75
}
true_values_C = {
3: 0.0004,
4: 0.0004,
5: 0.0003,
6: 0.0003,
}
meas_flag = False
RC_mod = True
line_split = 1.5
current_val = []
current_val_C = []
ids_type = []
labels = []
ids = []
@ -71,13 +86,21 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
for bnd_set in inputfile['boundary_conditions']:
if bnd_c['id'] == bnd_set['id']:
ids.append(bnd_c['id'])
ids_type.append('windkessel')
current_val.append(bnd_set['parameters']['R_d'])
labels.append('$R_' + str(bnd_c['id']))
if RC_mod:
current_val_C.append(bnd_set['parameters']['C'])
labels.append('$C_' + str(bnd_c['id']))
elif 'dirichlet' in bnd_c['type']:
current_val.append(inputfile['boundary_conditions'][1]['parameters']['U'])
current_val.append(inputfile['boundary_conditions'][0]['parameters']['U'])
ids.append(bnd_c['id'])
labels.append('U')
ids_type.append('dirichlet')
labels.append('$U')
dim = dat['theta'].shape[-1]
@ -91,9 +114,12 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
col = cycle(['C0', 'C1', 'C2', 'C3','C4'])
ls = cycle(['-', '-', '--', '--', ':', ':', '-.', '-.'])
#legends = cycle(['$R_3$','$R_4$','$R_5$','$R_6$','$U$'])
legends = cycle(labels)
if meas_flag:
t_und = t[0::30]
t_und = np.append( t_und , [t[-1]])
meas_mark = t_und*0
col_ = next(col)
ls_ = next(ls)
@ -104,21 +130,49 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
P = P.reshape((-1, 1, 1))
for i in range(dim):
true_level = np.log(true_values[ids[i]]/current_val[i])/np.log(2)
rec_value = np.round(2**theta[-1, i]*current_val[i],1)
idx = 0
idc = 0
for i in range(len(ids)):
cur_key = ids[i]
axes.plot(t, theta[:, i] + 1.5*i, '-', color=col_,label=legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$')
axes.fill_between(t, theta[:, i] + 1.5*i - np.sqrt(P[:, i, i]),
theta[:, i] + 1.5*i + np.sqrt(P[:, i, i]), alpha=0.3,
color=col_)
true_level = np.log(true_values[ids[i]]/current_val[i])/np.log(2)
rec_value = np.round(2**theta[-1, idx]*current_val[i],2)
#curve = theta[:,i] + line_split*i
#dash_curve = line_split*i + t*0 + true_level
axes.plot(t,1.5*i + t*0 + true_level , color=col_,ls='--')
col_ = next(col)
curve = theta[:,idx] + line_split*idx - true_level
dash_curve = line_split*idx + t*0
axes.plot(t, curve , '-', color=col_,label= legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$')
axes.fill_between(t, curve - np.sqrt(P[:, idx, idx]), curve + np.sqrt(P[:, idx, idx]), alpha=0.3, color=col_)
legends_=next(legends)
axes.plot(t, dash_curve , color=col_,ls='--')
if RC_mod:
if i<len(current_val_C):
true_level_C = np.log(true_values_C[ids[i]]/current_val_C[i])/np.log(2)
rec_value_C = np.round(2**theta[-1, idc]*current_val_C[idc],6)
curve_C = theta[:,idx+1] + line_split*(idx+1) - true_level_C
dash_curve_C = line_split*(idx+1) + t*0
#print(true_values_C[cur_key_C])
axes.plot(t, curve_C , '-', color=col_,label= legends_ + '= ' + str(rec_value_C) + '/' + str(true_values_C[cur_key]) + '$')
axes.fill_between(t, curve_C - np.sqrt(P[:, idx+1, idx+1]), curve_C + np.sqrt(P[:, idx+1, idx+1]), alpha=0.3, color=col_)
axes.plot(t, dash_curve_C , color=col_,ls='--')
legends_=next(legends)
idx +=1
idc +=1
if meas_flag:
axes.plot(t_und, meas_mark + line_split*idx, marker = 'x', color='red')
col_ = next(col)
idx +=1
axes.legend(fontsize=14,loc='lower right')
axes.set_xlim([-0.01,0.81])
@ -127,7 +181,7 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
print('Final value theta: \t {}'.format(theta[-1, :]))
print('Deparameterized: 2^theta_end: \t {}'.format(2**theta[-1, :]))
print('Real values: \t {}'.format(true_values))
print('Recon values: \t {a}:{b} '.format(a=ids[:],b=np.round(2**theta[-1, :]*current_val,2)))
#print('Recon values: \t {a}:{b} '.format(a=ids[:],b=np.round(2**theta[-1, :]*current_val,2)))

244
kalman/graphics/figure3.py Normal file
View File

@ -0,0 +1,244 @@
import matplotlib.pyplot as plt
import numpy as np
from itertools import cycle
import argparse
import pickle
import yaml
from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
rc('text', usetex=True)
import matplotlib.font_manager
def is_ipython():
''' Check if script is run in IPython.
Returns:
bool: True if IPython, else False '''
try:
get_ipython()
ipy = True
except NameError:
ipy = False
return ipy
def load_data(file):
''' Load numpy data from file.
Returns
dict: data dictionary
'''
dat = np.load(file)
return dat
def plot_parameters(dat, input_file, deparameterize=False, ref=None):
''' Plot the parameters in separate subplots with uncertainties.
Args:
dat (dict): data dictionary
deparameterize (bool): flag indicating if parameters should be
deparameterized via 2**theta
ref: reference value to be plotted with parameters
'''
if is_ipython():
plt.ion()
idx_a = input_file.find('/')
idx_b = input_file[idx_a+1::].find('/')
name_file = input_file[idx_a+1:idx_b+idx_a+1]
inputfile_path = 'results/' + name_file + '/input.yaml'
with open(inputfile_path) as file:
inputfile = yaml.full_load(file)
true_values = {
3: 4800,
4: 7200,
5: 11520,
6: 11520,
2: 75
}
true_values_C = {
3: 0.0004,
4: 0.0004,
5: 0.0003,
6: 0.0003,
}
meas_flag = False
RC_flag = False
line_split = 1.5
current_val = []
current_val_C = []
ids_type = []
labels = []
ids = []
for bnd_c in inputfile['estimation']['boundary_conditions']:
if 'windkessel' in bnd_c['type']:
for bnd_set in inputfile['boundary_conditions']:
if bnd_c['id'] == bnd_set['id']:
ids.append(bnd_c['id'])
ids_type.append('windkessel')
current_val.append(bnd_set['parameters']['R_d'])
labels.append('$R_' + str(bnd_c['id']))
if RC_flag:
current_val_C.append(bnd_set['parameters']['C'])
labels.append('$C_' + str(bnd_c['id']))
elif 'dirichlet' in bnd_c['type']:
current_val.append(inputfile['boundary_conditions'][0]['parameters']['U'])
ids.append(bnd_c['id'])
ids_type.append('dirichlet')
labels.append('$U')
dim = dat['theta'].shape[-1]
fig1, axes1 = plt.subplots(1,1,figsize=(12,6))
if RC_flag:
fig2, axes2 = plt.subplots(1,1,figsize=(12,6))
t = dat['times']
theta = dat['theta']
P = dat['P_theta']
col = cycle(['C0', 'C1', 'C2', 'C3','C4'])
ls = cycle(['-', '-', '--', '--', ':', ':', '-.', '-.'])
legends = cycle(labels)
if meas_flag:
t_und = t[0::30]
t_und = np.append( t_und , [t[-1]])
meas_mark = t_und*0
col_ = next(col)
ls_ = next(ls)
legends_=next(legends)
if dim == 1:
theta = theta.reshape((-1, 1))
P = P.reshape((-1, 1, 1))
idx = 0
idc = 0
for i in range(len(ids)):
cur_key = ids[i]
true_level = np.log(true_values[ids[i]]/current_val[i])/np.log(2)
rec_value = np.round(2**theta[-1, idx]*current_val[i],2)
#curve = theta[:,idx] + line_split*idx - true_level
#dash_curve = line_split*idx + t*0
curve = 2**theta[:, idx]*current_val[i]
std_down = 2**(-np.sqrt(P[:, idx, idx]))*curve
std_up = 2**np.sqrt(P[:, idx, idx])*curve
dash_curve = true_values[ids[i]] + t*0
if ids_type[i] == 'dirichlet':
pass
#axes3.plot(t, curve , '-', color=col_,label= legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$')
#axes3.fill_between(t, curve - np.sqrt(P[:, idx, idx]), curve + np.sqrt(P[:, idx, idx]), alpha=0.3, color=col_)
#legends_=next(legends)
#axes3.plot(t, dash_curve , color=col_,ls='--')
else:
axes1.plot(t, curve , '-', color=col_,label= legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$', linewidth = 2)
axes1.fill_between(t, std_down, std_up, alpha=0.3, color=col_)
axes1.plot(t, dash_curve , color=col_,ls='--')
legends_=next(legends)
if RC_flag:
if i<len(current_val_C):
true_level_C = np.log(true_values_C[ids[i]]/current_val_C[i])/np.log(2)
rec_value_C = np.round(2**theta[-1, idc]*current_val_C[idc],6)
curve_C = 2**theta[:, idx+1]*current_val_C[idc]
dash_curve_C = true_values_C[ids[i]] + t*0
std_C_down = 2**(-np.sqrt(P[:, idx+1, idx+1]))*curve_C
std_C_up = 2**np.sqrt(P[:, idx+1, idx+1])*curve_C
axes2.plot(t, curve_C , '-', color=col_,label= legends_ + '= ' + str(rec_value_C) + '/' + str(true_values_C[cur_key]) + '$', linewidth = 2)
axes2.fill_between(t, std_C_down, std_C_up, alpha=0.3, color=col_)
axes2.plot(t, dash_curve_C , color=col_,ls='--')
legends_=next(legends)
idx +=1
idc +=1
if meas_flag:
axes1.plot(t_und, meas_mark + line_split*idx, marker = 'x', color='red')
col_ = next(col)
idx +=1
axes1.set_ylabel(r'$R_d$',fontsize=22)
axes1.legend(fontsize=18,loc='upper right')
axes1.set_xlim([-0.01,0.81])
axes1.set_xlabel(r'$t (s)$',fontsize=22)
plt.savefig('C.png')
if RC_flag:
axes2.set_ylabel(r'$C$',fontsize=22)
axes2.legend(fontsize=18,loc='upper right')
axes2.set_xlim([-0.01,0.81])
axes2.set_xlabel(r'$t (s)$',fontsize=22)
fig2.savefig('C.png')
fig1.savefig('Rd.png')
if not is_ipython():
plt.show()
def get_parser():
parser = argparse.ArgumentParser(
description='''
Plot the time evolution of the ROUKF estimated parameters.
To execute in IPython::
%run plot_roukf_parameters.py [-d] [-r N [N \
...]] file
''',
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('file', type=str, help='path to ROUKF stats file')
parser.add_argument('-d', '--deparameterize', action='store_true',
help='deparameterize the parameters by 2**theta')
parser.add_argument('-r', '--ref', metavar='N', nargs='+', default=None,
type=float, help='Reference values for parameters')
return parser
if __name__ == '__main__':
args = get_parser().parse_args()
dat = load_data(args.file)
plot_parameters(dat, args.file,deparameterize=args.deparameterize, ref=args.ref)

View File

@ -4,10 +4,11 @@ mesh: './meshes/coaortaH1.h5'
fluid:
density: 1.2
dynamic_viscosity: 0.035
stokes: True
stokes: False
implicit_windkessel: True
io:
write_path: 'results/aorta_1ms'
write_path: 'results/Rz_Pa_vnoise'
restart:
path: '' # './projects/nse_coa3d/results/test_restart2/'
time: 0
@ -17,53 +18,86 @@ io:
write_velocity: 'update' # update or tentative
boundary_conditions:
-
id: 2
type: 'dirichlet'
#value: ['0','0','-U*sin(DOLFIN_PI*t/Th)*(t<=Th) + (t<0.8)*(Th<t)*(U*DOLFIN_PI/Th*(t-Th)*exp(-(t-Th)*beta)) +
# -U*sin(DOLFIN_PI*(t-0.8)/Th)*(t<= 0.8+Th )*(t>0.8) + (t<1.6)*(0.8+Th<t)*(U*DOLFIN_PI/Th*(t-0.8-Th)*exp(-(t-0.8-Th)*beta)) +
# -U*sin(DOLFIN_PI*(t-1.6)/Th)*(t<= 1.6+Th )*(t>1.6) + (t<2.4)*(1.6+Th<t)*(U*DOLFIN_PI/Th*(t-1.6-Th)*exp(-(t-1.6-Th)*beta))' ]
value: ['0','0','-U*sin(DOLFIN_PI*t/Th)*(t<=Th) + (Th<t)*(U*DOLFIN_PI/Th*(t-Th)*exp(-(t-Th)*beta))']
parameters:
#U: 75 #P0
U: 150 #Pa
#U: 100 #Pg
#U: 40 #Pc
Th: 0.36
beta: 70
t: 0
-
id: 1
type: 'dirichlet'
value: ['0','0','0']
-
id: 2
type: 'dirichlet'
value: ['0','0','-U*sin(DOLFIN_PI*t/Th)*(t<=Th) + (Th<t)*(-3.67949466208*U*sin(9*DOLFIN_PI*t/Th)*exp(-t*10))']
parameters:
U: 100
Th: 0.35
t: 0
-
id: 3
type: 'windkessel'
parameters:
R_p: 10
C: 0.0008
R_d: 2400
p0: 80
R_p: 200
C: 0.0004
R_d: 4800
p0: 85
conv: 1333.223874
-
id: 4
type: 'windkessel'
parameters:
R_p: 60
C: 0.00034
R_d: 4200
p0: 80
R_p: 480
#C: 0.0004 # P0
C: 0.0005 # Pa
#C: 0.0010 # Pb
#C: 0.0001 # Pc
#C: 0.0008 # Pg
#R_d: 7200 #P0
R_d: 8760 #Pa
#R_d: 17520 #Pb x2
#R_d: 10000 #Pg
#R_d: 4000 #Pc
p0: 85
conv: 1333.223874
-
id: 5
type: 'windkessel'
parameters:
R_p: 220
C: 0.00034
R_d: 11000
p0: 80
R_p: 520
#C: 0.0003 # REFERENCE
C: 0.0005 # Pa
#C: 0.0010 # Pb
#C: 0.0001 # Pc
#C: 0.0008 # Pg
#R_d: 11520 # REFERENCE
R_d: 8760 #Pa
#R_d: 17520 #Pb x2
#R_d: 26280 #Pc x3
#R_d: 10000 #Pg
#R_d: 4000 #Pc
p0: 85
conv: 1333.223874
-
id: 6
type: 'windkessel'
parameters:
R_p: 160
C: 0.00034
R_d: 7800
p0: 80
R_p: 520
#C: 0.0003 # REFERENCE
C: 0.0005 #Pa
#C: 0.0010 #Pb
#C: 0.0001 #Pc
#C: 0.0008 #Pg
#R_d: 11520 # REFERENCE
R_d: 8760 #Pa
#R_d: 17520 #Pb x2
#R_d: 26280 #Pc x3
#R_d: 10000 #Pg
#R_d: 4000 #Pc
p0: 85
conv: 1333.223874
timemarching:
@ -91,8 +125,8 @@ timemarching:
T: 0.8 # end time
dt: 0.001
write_dt: 0.04
checkpoint_dt: 0.04 # <= 0: only last; else value + last
write_dt: 0.03
checkpoint_dt: 0.03 # <= 0: only last; else value + last
report: 1 # 0: print nothing, 1: print time step and writeout, 2: 1 + flux
# solver setup
@ -104,9 +138,9 @@ fem:
convection_skew_symmetric: True # aka Temam term
stabilization:
forced_normal:
enabled: False
boundaries: [6]
gamma: 10
enabled: True
boundaries: [3,4,5,6]
gamma: 20
backflow_boundaries: [3,4,5,6]
streamline_diffusion:
enabled: False
@ -135,32 +169,37 @@ estimation:
-
id: 4
type: 'windkessel'
mode: 'Rd'
initial_stddev: 1
-
id: 5
type: 'windkessel'
mode: 'Rd'
initial_stddev: 1
-
id: 6
type: 'windkessel'
mode: 'Rd'
initial_stddev: 1
-
id: 2
type: 'dirichlet'
parameters: 'U'
initial_stddev: 1
#-
# id: 5
# type: 'windkessel'
# initial_stddev: 1
#-
# id: 6
# type: 'windkessel'
# initial_stddev: 1
#-
# id: 2
# type: 'dirichlet'
# parameters: 'U'
# initial_stddev: 1
measurements:
-
#mesh: '/home/yeye/NuMRI/kalman/meshes/coaortaH3_leo2.0.h5'
mesh: './meshes/coaortaH1.h5'
mesh: '/home/yeye/NuMRI/kalman/meshes/coaortaH3_leo2.0.h5'
#mesh: './meshes/coaortaH1.h5'
fe_degree: 1
xdmf_file: 'measurements/aorta/u_all.xdmf'
file_root: 'measurements/aorta/u{i}.h5'
#xdmf_file: 'measurements/aorta_zdir/Perturbation/Mg15V120/u_all.xdmf'
#file_root: 'measurements/aorta_zdir/Perturbation/Mg15V120/u{i}.h5'
xdmf_file: 'measurements/aorta_zdir_vnoise/u_all.xdmf'
file_root: 'measurements/aorta_zdir_vnoise/u{i}.h5'
indices: 0 # indices of checkpoints to be processed. 0 == all
velocity_direction: ~
noise_stddev: 0 # standard deviation of Gaussian noise
velocity_direction: [0,0,1]
noise_stddev: 45 # standard deviation of Gaussian noise
roukf:
particles: 'simplex' # unique or simplex
@ -168,4 +207,4 @@ estimation:
reparameterize: True
ODV_functional:
enable: False
VENC: 102 # 102,120% 59,70% 42 50%, 21,25%
VENC: 244

View File

@ -1,150 +0,0 @@
mesh: './meshes/coaortaH1.h5'
# Physical parameters of the fluid
fluid:
density: 1.2
dynamic_viscosity: 0.035
io:
write_path: 'results/aorta_leo'
restart:
path: '' # './projects/nse_coa3d/results/test_restart2/'
time: 0
write_xdmf: True
write_checkpoints: True
write_hdf5_timeseries: False
write_velocity: 'update' # update or tentative
boundary_conditions:
-
id: 1
type: 'dirichlet'
value: ['0','0','0']
-
id: 2
type: 'dirichlet'
value: ['0','0','-U*sin(DOLFIN_PI*t/Th)*(t<=Th) + (Th<t)*(-3.67949466208*U*sin(9*DOLFIN_PI*t/Th)*exp(-t*10))']
parameters:
U: 30
Th: 0.35
t: 0
-
id: 3
type: 'windkessel'
value: [10,0,0]
p0: [0,1333.223874]
-
id: 4
type: 'windkessel'
value: [250,0,0]
p0: [0,1333.223874]
-
id: 5
type: 'windkessel'
value: [250,0,0]
p0: [0,1333.223874]
-
id: 6
type: 'windkessel'
value: [250,0,0]
p0: [0,1333.223874]
timemarching:
velocity_pressure_coupling: 'fractionalstep' # monolithic, fractionalstep
monolithic:
timescheme: 'gmp' # generalized midpoint, steady FIXME TODO
theta: 1 # 1: Euler, 0.5: implicit midpoint rule (one-legged)
nonlinear:
method: 'constant_extrapolation' # constant_extrapolation, linear_extrapolation, newton, picard, snes
maxit: 20
init_steps: 30
use_aitken: 1 # 0: False, 1: Picard only, 2: all
report: 1 # 0: None, 1: residuals, 2: residuals and energy (inflow/driving/forcing via ESSENTIAL Dbcs!)
atol: 1.e-6 # note: dot required!!
rtol: 1.e-16
stol: 0.0
fractionalstep:
scheme: 'CT' # CT, IPCS
coupled_velocity: False # False faster, True needed if robin_bc implicit
robin_bc_velocity_scheme: 'implicit' # explicit, semi-implicit, implicit
transpiration_bc_projection: 'robin' # robin, dirichlet
flux_report_normalize_boundary: 1
T: 0.8 # end time
dt: 0.01
write_dt: 0.04
checkpoint_dt: 0.04 # <= 0: only last; else value + last
report: 1 # 0: print nothing, 1: print time step and writeout, 2: 1 + flux
# solver setup
fem:
velocity_space: p1 # p1 p1b/p1+ p2
pressure_space: p1 # p1 p0/dg0 dg1
strain_symmetric: False
convection_skew_symmetric: True # aka Temam term
stabilization:
forced_normal:
enabled: True
boundaries: [6]
gamma: 10
backflow_boundaries: [3,4,5,6]
streamline_diffusion:
enabled: False
parameter: 'standard' # standard, shakib, codina, klr
length_scale: 'metric' # average, max, metric
parameter_element_constant: True
Cinv: ~
monolithic:
infsup: 'pspg' # pspg, pressure-stabilization
graddiv: False
consistent: False
pressure_stab_constant: 1.
fix_pressure: False
fix_pressure_point: [0., 0. , 0.]
linear_solver:
method: 'lu'
estimation:
boundary_conditions:
-
id: 3
type: 'windkessel'
initial_stddev: 1
-
id: 4
type: 'windkessel'
initial_stddev: 1
-
id: 5
type: 'windkessel'
initial_stddev: 1
-
id: 6
type: 'windkessel'
initial_stddev: 1
-
id: 2
type: 'dirichlet'
parameters: 'U'
initial_stddev: 1
measurements:
-
mesh: './meshes/coaortaH3_leo2.0.h5'
fe_degree: 1
xdmf_file: 'results/aorta_leo/measurements/u_all.xdmf'
file_root: 'results/aorta_leo/measurements/u{i}.h5'
indices: 0 # indices of checkpoints to be processed. 0 == all
velocity_direction: ~
noise_stddev: 5 # standard deviation of Gaussian noise
roukf:
particles: 'simplex' # unique or simplex
observation_operator: 'postprocessing' #state or postprocessing
reparameterize: True

View File

@ -1,129 +0,0 @@
mesh: './meshes/coaortaH1.h5'
# Physical parameters of the fluid
fluid:
density: 1.2
dynamic_viscosity: 0.035
io:
write_path: 'results/aorta/'
restart:
path: '' # './projects/nse_coa3d/results/test_restart2/'
time: 0
write_xdmf: True
write_checkpoints: True
write_hdf5_timeseries: False
write_velocity: 'update' # tentative
boundary_conditions:
-
id: 1
type: 'dirichlet'
value: ['0','0','0']
-
id: 2
type: 'dirichlet'
value: ['0','0','-U*sin(DOLFIN_PI*t/Th)*(t<=Th) + (Th<t)*(-3.67949466208*U*sin(9*DOLFIN_PI*t/Th)*exp(-t*10))']
parameters:
U: 30
Th: 0.35
t: 0
-
id: 3
type: 'neumann'
value: 0
-
id: 4
type: 'neumann'
value: 0
-
id: 5
type: 'neumann'
value: 0
-
id: 6
type: 'neumann'
value: 0
timemarching:
velocity_pressure_coupling: 'fractionalstep' # monolithic, fractionalstep
monolithic:
timescheme: 'gmp' # generalized midpoint, steady FIXME TODO
theta: 1 # 1: Euler, 0.5: implicit midpoint rule (one-legged)
nonlinear:
method: 'constant_extrapolation' # constant_extrapolation, linear_extrapolation, newton, picard, snes
maxit: 20
init_steps: 30
use_aitken: 1 # 0: False, 1: Picard only, 2: all
report: 1 # 0: None, 1: residuals, 2: residuals and energy (inflow/driving/forcing via ESSENTIAL Dbcs!)
atol: 1.e-6 # note: dot required!!
rtol: 1.e-16
stol: 0.0
fractionalstep:
scheme: 'CT' # CT, IPCS
coupled_velocity: False # False faster, True needed if robin_bc implicit
robin_bc_velocity_scheme: 'implicit' # explicit, semi-implicit, implicit
transpiration_bc_projection: 'robin' # robin, dirichlet
flux_report_normalize_boundary: 1
T: 0.8 # end time
dt: 0.01
write_dt: 0.04
checkpoint_dt: 0.04 # <= 0: only last; else value + last
report: 1 # 0: print nothing, 1: print time step and writeout, 2: 1 + flux
# solver setup
fem:
velocity_space: p1 # p1 p1b/p1+ p2
pressure_space: p1 # p1 p0/dg0 dg1
strain_symmetric: False
convection_skew_symmetric: True # aka Temam term
stabilization:
forced_normal:
enabled: True
boundaries: [6]
gamma: 10
backflow_boundaries: [3,4,5,6]
streamline_diffusion:
enabled: False
parameter: 'standard' # standard, shakib, codina, klr
length_scale: 'metric' # average, max, metric
parameter_element_constant: True
Cinv: ~
monolithic:
infsup: 'pspg' # pspg, pressure-stabilization
graddiv: False
consistent: False
pressure_stab_constant: 1.
fix_pressure: False
fix_pressure_point: [0., 0. , 0.]
linear_solver:
method: 'lu'
estimation:
boundary_conditions:
-
id: 2
type: 'dirichlet'
parameters: 'U'
initial_stddev: 1
measurements:
-
mesh: './meshes/coaortaH1.h5'
fe_degree: 1
xdmf_file: 'results/aorta/measurements/u_all.xdmf'
file_root: 'results/aorta/measurements/u{i}.h5'
indices: 0 # indices of checkpoints to be processed. 0 == all
velocity_direction: ~
noise_stddev: 1.5 # standard deviation of Gaussian noise
roukf:
particles: 'simplex' # unique or simplex
observation_operator: 'postprocessing' #state or postprocessing
reparameterize: True

0
presentations/press_course1/images/4dflow.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 346 KiB

After

Width:  |  Height:  |  Size: 346 KiB

0
presentations/press_course1/images/MRI.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

View File

Before

Width:  |  Height:  |  Size: 496 KiB

After

Width:  |  Height:  |  Size: 496 KiB

0
presentations/press_course1/images/catheter.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 922 KiB

After

Width:  |  Height:  |  Size: 922 KiB

0
presentations/press_course1/images/p.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB