This commit is contained in:
J.E. Garay Labra 2021-02-10 16:46:37 -03:00
parent 2104fff84c
commit ffdc03c62e
3 changed files with 58 additions and 36 deletions

View File

@ -1,20 +1,5 @@
import numpy as np
vref = [10, 250, 250, 250, 30]
#case 2
v_no = [9.37, 246.18, 251.68, 252.37, 29.79]
v_70 = [18.21, 217.19, 198, 227.76, 29]
vnew_70 = [9.42, 244.59, 247.93, 246.89, 29.79]
v_50 = [64.05, 205.9, 195.55, 246.47, 22.58]
vnew_50 = [ 9.46 ,244.47 ,248.09 ,244.69 ,29.76]
#acse 1
v_no_case1 = [ 9.58 , 246.97, 252.41 , 252.47 , 29.81]
v_70_case1 = [17.93, 215.25, 193.09, 226.87, 29.02]
v_50_case1 = [64.59, 207.49, 193.08, 248.51, 22.63]
vnew_70_case1 = [ 9.51 , 237.32, 238.26, 234.33, 29.79]
vnew_50_case1 = [ 9.48, 237.58, 239.46, 231.55, 29.76]
def compute_relative_error(vcur,vref):
eps = 0
@ -24,11 +9,29 @@ def compute_relative_error(vcur,vref):
return np.sqrt(eps)
eps_ref = compute_relative_error(v_no,vref)
eps_70 = compute_relative_error(v_70,vref)
eps_new70 = compute_relative_error(vnew_70,vref)
eps_50 = compute_relative_error(v_50,vref)
eps_new50 = compute_relative_error(vnew_50,vref)
vref = [10, 250, 250, 250, 30]
#case 1
v_no_case1 = [ 10.05 , 248.34, 250.52 , 254.43 , 29.82]
v_70_case1 = [20.38, 211.19, 189.01, 207.09, 28.78]
v_50_case1 = [90.45, 240.98, 241.03, 316.89, 21.27]
vnew_70_case1 = [ 10.26 , 250.73, 252.78, 256.62 , 29.77]
vnew_50_case1 = [ 10.27 , 248.41 ,254.71 ,253.01 , 29.82]
#case 2
v_no_case2 = [ 9.77, 249.7 , 251.94, 254.91 , 29.82]
v_70_case2 = [ 20.7 , 214.77 ,196.47 ,209.31 , 28.76]
v_50_case2 = [ 88.4, 236.73 ,240.39 ,312.85, 21.22]
vnew_70_case2 = [ 10 , 250.24 ,252.05 ,254.98 , 29.76]
vnew_50_case2 = [ 9.92 ,247.61 ,253.35 ,250.64 ,29.81]
eps_ref_case1 = compute_relative_error(v_no_case1,vref)
eps_70_case1 = compute_relative_error(v_70_case1,vref)
@ -36,16 +39,33 @@ eps_new70_case1 = compute_relative_error(vnew_70_case1,vref)
eps_50_case1 = compute_relative_error(v_50_case1,vref)
eps_new50_case1 = compute_relative_error(vnew_50_case1,vref)
print('reference error = {e}'.format(e=np.round(100*eps_ref,2)))
print('venc 70% error = {e}'.format(e=np.round(100*eps_70,2)))
print('odv venc 70% error = {e}'.format(e=np.round(100*eps_new70,2)))
print('venc 50% error = {e}'.format(e=np.round(100*eps_50,2)))
print('odv venc 50% error = {e}'.format(e=np.round(100*eps_new50,2)))
print('-------------------')
eps_ref_case2 = compute_relative_error(v_no_case2,vref)
eps_70_case2 = compute_relative_error(v_70_case2,vref)
eps_new70_case2 = compute_relative_error(vnew_70_case2,vref)
eps_50_case2 = compute_relative_error(v_50_case2,vref)
eps_new50_case2 = compute_relative_error(vnew_50_case2,vref)
print('--------- CASE 1 ---------')
print('reference error = {e}'.format(e=np.round(100*eps_ref_case1,2)))
print('venc 70% error = {e}'.format(e=np.round(100*eps_70_case1,2)))
print('odv venc 70% error = {e}'.format(e=np.round(100*eps_new70_case1,2)))
print('venc 50% error = {e}'.format(e=np.round(100*eps_50_case1,2)))
print('odv venc 50% error = {e}'.format(e=np.round(100*eps_new50_case1,2)))
print('--------- CASE 2 ---------')
print('reference error = {e}'.format(e=np.round(100*eps_ref_case2,2)))
print('venc 70% error = {e}'.format(e=np.round(100*eps_70_case2,2)))
print('odv venc 70% error = {e}'.format(e=np.round(100*eps_new70_case2,2)))
print('venc 50% error = {e}'.format(e=np.round(100*eps_50_case2,2)))
print('odv venc 50% error = {e}'.format(e=np.round(100*eps_new50_case2,2)))

View File

@ -25,28 +25,28 @@ boundary_conditions:
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
U: 60
Th: 0.35
t: 0
-
id: 3
type: 'windkessel'
value: [10,0,0]
value: [20,0,0]
p0: [0,1333.223874]
-
id: 4
type: 'windkessel'
value: [250,0,0]
value: [500,0,0]
p0: [0,1333.223874]
-
id: 5
type: 'windkessel'
value: [250,0,0]
value: [500,0,0]
p0: [0,1333.223874]
-
id: 6
type: 'windkessel'
value: [250,0,0]
value: [500,0,0]
p0: [0,1333.223874]
timemarching:
@ -138,8 +138,10 @@ estimation:
-
mesh: './meshes/coaortaH3_leo2.0.h5'
fe_degree: 1
xdmf_file: 'results/aorta/measurements/Perturbation/SNRinfV50/u_all.xdmf'
file_root: 'results/aorta/measurements/Perturbation/SNRinfV50/u{i}.h5'
xdmf_file: 'results/aorta/measurements/Perturbation/Ks12V50/u_all.xdmf'
file_root: 'results/aorta/measurements/Perturbation/Ks12V50/u{i}.h5'
#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: 15 # standard deviation of Gaussian noise
@ -150,4 +152,4 @@ estimation:
reparameterize: True
ODV_functional:
enable: True
VENC: 44 # cm/s ref: 61 for 70% and 44 for 50%
VENC: 42 # cm/s ref: 59 for 70% and 42 for 50%

View File

@ -118,5 +118,5 @@ estimation:
observation_operator: 'postprocessing' #state or postprocessing
reparameterize: True
ODV_functional:
enable: True
enable: False
VENC: 18 # cm/s ref: 25 for 70% and 18 for 50%