new figures: paper
This commit is contained in:
		
							
								
								
									
										37
									
								
								kalman/graphics/figure_func.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								kalman/graphics/figure_func.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
u = np.linspace(-2,2,100)
 | 
			
		||||
utrue = 1
 | 
			
		||||
venc1 = 0.9*utrue
 | 
			
		||||
venc2 = 0.6*utrue
 | 
			
		||||
 | 
			
		||||
fig1, ax1 = plt.subplots(1,1,figsize=(8, 5))
 | 
			
		||||
 | 
			
		||||
J1 = 1 - np.cos((utrue-u)/venc1*np.pi)
 | 
			
		||||
J2 = 1 - np.cos((utrue-u)/venc2*np.pi)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
lwidth = 2
 | 
			
		||||
font_size = 28
 | 
			
		||||
 | 
			
		||||
ax1.plot(u, J1, color = 'orangered', label = '$venc = 0.9 u_{true}$', linestyle='-',linewidth=lwidth)
 | 
			
		||||
ax1.plot(u, J2, color = 'dodgerblue', label = '$venc = 0.6 u_{true}$', linestyle='-',linewidth=lwidth)
 | 
			
		||||
ax1.axvline(x=1,color = 'black',linewidth = lwidth , label = '$u_{true}$')
 | 
			
		||||
 | 
			
		||||
ax1.legend(fontsize=20, loc= 'upper right')
 | 
			
		||||
ax1.tick_params(axis='both', which='major', labelsize=22)
 | 
			
		||||
ax1.set_yticks([])
 | 
			
		||||
ax1.set_xlabel('$u$',fontsize=font_size)
 | 
			
		||||
plt.show()
 | 
			
		||||
fig1.savefig('functionals.png', dpi=500, bbox_inches='tight')
 | 
			
		||||
							
								
								
									
										170
									
								
								kalman/graphics/figure_func2.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										170
									
								
								kalman/graphics/figure_func2.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,170 @@
 | 
			
		||||
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)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
fig1, ax1 = plt.subplots(1,1,figsize=(8, 5))
 | 
			
		||||
lwidth = 2
 | 
			
		||||
font_size = 28
 | 
			
		||||
 | 
			
		||||
################ Flow Parameters
 | 
			
		||||
Rd      =   2.5
 | 
			
		||||
Rt      =   0.5
 | 
			
		||||
GradP   =   4
 | 
			
		||||
mu      =   0.5
 | 
			
		||||
fac     =   1
 | 
			
		||||
nr      =   50
 | 
			
		||||
VENC    =   0.6
 | 
			
		||||
 | 
			
		||||
gamma   =   267.513e6     #  rad/Tesla/sec   Gyromagnetic ratio for H nuclei
 | 
			
		||||
Bo      =   1.5              #  Tesla           Magnetic Field Strenght
 | 
			
		||||
TE      =   5e-3             #  Echo-time
 | 
			
		||||
M       =   np.ones(nr)         #  Magnetization
 | 
			
		||||
phi0    =   gamma*Bo*TE       # Reference phase
 | 
			
		||||
phi02   =   phi0%3.14
 | 
			
		||||
M1      =   np.pi/(gamma*VENC)
 | 
			
		||||
ff      =   np.pi/(1000*gamma*M1)
 | 
			
		||||
uv      =   np.arange(-4*VENC,4*VENC,ff)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
r       =   np.linspace(-Rd, Rd, nr)
 | 
			
		||||
dr      =   r[2]-r[1]
 | 
			
		||||
vmax    =   1
 | 
			
		||||
v       =   vmax/Rt**2*( Rt**2 - r**2 )*(np.abs(r)<Rt);  # Poiseuille Formula
 | 
			
		||||
ai      =   v/vmax
 | 
			
		||||
 | 
			
		||||
theta       =   np.linspace(-4,5,2000)
 | 
			
		||||
vtest       =   np.linspace(-5,5,2000)
 | 
			
		||||
JF          =   0*theta
 | 
			
		||||
jv          =   0*theta
 | 
			
		||||
JV          =   0*theta
 | 
			
		||||
Mjv         =   np.zeros([len(theta),len(ai)])
 | 
			
		||||
jv0         =   0*theta
 | 
			
		||||
JV0         =   0*theta
 | 
			
		||||
Mjv0        =   np.zeros([len(theta),len(ai)])
 | 
			
		||||
#################################### MAGNETIZACION FROM V
 | 
			
		||||
phiv    =   phi02 + v*np.pi/VENC
 | 
			
		||||
modv    =   np.ones(phiv.shape) 
 | 
			
		||||
M1  =   modv*np.cos(phi02)  + 1j*modv*np.sin(phi02)
 | 
			
		||||
M2  =   modv*np.cos(phiv)   + 1j*modv*np.sin(phiv)
 | 
			
		||||
 | 
			
		||||
################################### FFT to COMPLEX M
 | 
			
		||||
S1      =   np.fft.fft(M1)
 | 
			
		||||
S2      =   np.fft.fft(M2)
 | 
			
		||||
################################### SubSampling
 | 
			
		||||
a1      =   0
 | 
			
		||||
a2      =   1
 | 
			
		||||
##### FILLED WITH ZEROS
 | 
			
		||||
US1         =   S1
 | 
			
		||||
US2         =   0*S2
 | 
			
		||||
US2[a1::a2] =   S2[a1::a2]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
MR1         =   np.fft.ifft(US1)
 | 
			
		||||
MR2         =   np.fft.ifft(US2)
 | 
			
		||||
vrec1       =   (np.angle(MR2)-phi02)*VENC/(np.pi)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
for k in range(len(ai)):
 | 
			
		||||
    jv0         =   1-np.cos(np.pi*(vrec1[k]-vtest)/VENC)
 | 
			
		||||
    Mjv0[:,k]   =   jv0[:]
 | 
			
		||||
    JV0         =   JV0 + jv0  
 | 
			
		||||
 | 
			
		||||
for k in range(len(ai)):
 | 
			
		||||
    jv          =   1-np.cos(np.pi*(vrec1[k]-theta*ai[k])/VENC)
 | 
			
		||||
    Mjv[:,k]    =   jv[:]
 | 
			
		||||
    JV          =   JV + jv 
 | 
			
		||||
 | 
			
		||||
NJV1    =   JV*100/np.max(JV)
 | 
			
		||||
 | 
			
		||||
MV = Mjv0
 | 
			
		||||
V =NJV1
 | 
			
		||||
 | 
			
		||||
left, bottom, width, height = [0.2, 0.2, 0.1, 0.1]
 | 
			
		||||
 | 
			
		||||
fig     =   plt.figure(figsize=(12, 6), dpi=100)
 | 
			
		||||
ax1     =   plt.subplot(1,2,1)
 | 
			
		||||
 | 
			
		||||
ch1     =   20
 | 
			
		||||
ch2     =   23
 | 
			
		||||
 | 
			
		||||
ax0 = fig.add_axes([left, bottom, width, height])
 | 
			
		||||
ax0.plot(r,v,'b-')
 | 
			
		||||
ax0.plot([r[ch1]],[v[ch1]],color='xkcd:coral',marker='o')
 | 
			
		||||
ax0.plot([r[ch2]],[v[ch2]],color='xkcd:azure',marker='o')
 | 
			
		||||
ax0.set_xlim((-1.5,1.5))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#for k in range(22,39):
 | 
			
		||||
#   if k!=ch1 and k!=ch2 and np.sum(MV[:,k])!=0:        
 | 
			
		||||
#       ax1.plot(vtest, MV[:,k],color='xkcd:beige',alpha=0.8)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ax1.plot(vtest, MV[:,ch1],color='xkcd:coral',label='$v_1$')
 | 
			
		||||
ax1.plot(vtest, MV[:,ch2],color='xkcd:azure',label='$v_2$')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
m1x     =   vtest[np.where( np.abs(MV[:,ch1] - np.min(MV[:,ch1]))<0.001  )]
 | 
			
		||||
 | 
			
		||||
m1y     =   np.min(MV[:,ch1])
 | 
			
		||||
 | 
			
		||||
m2x     =   vtest[np.where( np.abs(MV[:,ch2] - np.min(MV[:,ch2]))<0.001  )]
 | 
			
		||||
#m2x    =   vtest[np.where(MV[:,ch2]==np.min(MV[:,ch2]))]
 | 
			
		||||
m2y     =   np.min(MV[:,ch2])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ax1.plot([m1x],[m1y],color='xkcd:coral',marker='o')
 | 
			
		||||
ax1.plot([m2x],[m2y],color='xkcd:azure',marker='o')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ax1.axvline(x=v[ch1], color='xkcd:coral', linestyle='--',label='$v_{1,true}$')
 | 
			
		||||
ax1.axvline(x=v[ch2], color='xkcd:azure', linestyle='--',label='$v_{2,true}$')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ax1.set_xlabel(r'$u$',fontsize=20)
 | 
			
		||||
ax1.set_ylabel(r'$J_i(u)$',fontsize=20)
 | 
			
		||||
#ax1.legend(loc='upper right', bbox_to_anchor=(0.5, 1.05),ncol=2, fancybox=True, shadow=True,fontsize=15)
 | 
			
		||||
ax1.set_yticks([])
 | 
			
		||||
ax1.set_xticks([])
 | 
			
		||||
ax1.set_xlim((-3.5,3.5))
 | 
			
		||||
ax1.set_ylim((-1.0,2.4))
 | 
			
		||||
 | 
			
		||||
ax2     =   plt.subplot(1,2,2)
 | 
			
		||||
ax2.plot(theta,V,'b-')
 | 
			
		||||
ax2.axvline(x=1, color='k', linestyle='--')
 | 
			
		||||
ax2.set_xlabel(r'$\theta$',fontsize=20)
 | 
			
		||||
ax2.set_ylabel(r'$J_T(\theta)$',fontsize=20)
 | 
			
		||||
plt.yticks([])
 | 
			
		||||
ax2.set_xticks([])
 | 
			
		||||
plt.title(r'$\theta_{true}=1$' + '\n' +'$venc < v_{max}$',fontsize=15)
 | 
			
		||||
plt.xlim((-2,3))
 | 
			
		||||
 | 
			
		||||
plt.show()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ax1.plot(u, J1, color = 'orangered', label = '$venc = 0.9 u_{true}$', linestyle='-',linewidth=lwidth)
 | 
			
		||||
#ax1.plot(u, J2, color = 'dodgerblue', label = '$venc = 0.6 u_{true}$', linestyle='-',linewidth=lwidth)
 | 
			
		||||
#ax1.axvline(x=1,color = 'black',linewidth = lwidth , label = '$u_{true}$')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ax1.legend(fontsize=20, loc= 'upper right')
 | 
			
		||||
ax1.tick_params(axis='both', which='major', labelsize=22)
 | 
			
		||||
ax1.set_yticks([])
 | 
			
		||||
ax1.set_xlabel('$u$',fontsize=font_size)
 | 
			
		||||
plt.show()
 | 
			
		||||
#fig1.savefig('functionals.png', dpi=500, bbox_inches='tight')
 | 
			
		||||
@@ -5,10 +5,11 @@ fluid:
 | 
			
		||||
    density: 1.2
 | 
			
		||||
    dynamic_viscosity: 0.035
 | 
			
		||||
    stokes: False
 | 
			
		||||
    implicit_windkessel: False
 | 
			
		||||
    implicit_windkessel: True
 | 
			
		||||
    state_velocity: 'update'
 | 
			
		||||
 | 
			
		||||
io:
 | 
			
		||||
    write_path: 'results/expl_1ms'
 | 
			
		||||
    write_path: 'results/updRz_Pb_wp0.5wm16.84'
 | 
			
		||||
    restart:
 | 
			
		||||
        path: ''  # './projects/nse_coa3d/results/test_restart2/' 
 | 
			
		||||
        time: 0
 | 
			
		||||
@@ -27,8 +28,8 @@ boundary_conditions:
 | 
			
		||||
        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  #REFERENCE
 | 
			
		||||
            U: 120  
 | 
			
		||||
            #U: 150 #Pa/Pb
 | 
			
		||||
            #U: 120  
 | 
			
		||||
            U: 150 #Pa/Pb
 | 
			
		||||
            #U: 40 #Pc
 | 
			
		||||
            Th: 0.36
 | 
			
		||||
            beta: 70
 | 
			
		||||
@@ -56,9 +57,9 @@ boundary_conditions:
 | 
			
		||||
            #C: 0.0010   # Pb
 | 
			
		||||
            #C: 0.0001   # Pc
 | 
			
		||||
            #C: 0.0008   # Pg
 | 
			
		||||
            R_d: 7200  # REFERENCE
 | 
			
		||||
            #R_d: 7200  # REFERENCE
 | 
			
		||||
            #R_d:  8760  #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000  #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
@@ -72,9 +73,9 @@ boundary_conditions:
 | 
			
		||||
            #C: 0.0010 # Pb
 | 
			
		||||
            #C: 0.0001 # Pc
 | 
			
		||||
            #C: 0.0008 # Pg
 | 
			
		||||
            R_d: 11520 # REFERENCE
 | 
			
		||||
            #R_d: 11520 # REFERENCE
 | 
			
		||||
            #R_d:  8760  #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000 #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
@@ -87,9 +88,9 @@ boundary_conditions:
 | 
			
		||||
            #C: 0.0005 #Pa
 | 
			
		||||
            #C: 0.0010 #Pb
 | 
			
		||||
            #C: 0.0001 #Pc
 | 
			
		||||
            R_d: 11520 # REFERENCE
 | 
			
		||||
            #R_d: 11520 # REFERENCE
 | 
			
		||||
            #R_d:  8760 #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000 #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
@@ -118,7 +119,7 @@ timemarching:
 | 
			
		||||
        flux_report_normalize_boundary: 1
 | 
			
		||||
 | 
			
		||||
    T: 0.8       # end time
 | 
			
		||||
    dt: 0.002
 | 
			
		||||
    dt: 0.001
 | 
			
		||||
    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
 | 
			
		||||
@@ -132,7 +133,7 @@ fem:
 | 
			
		||||
    convection_skew_symmetric: True    # aka Temam term
 | 
			
		||||
    stabilization:
 | 
			
		||||
        forced_normal:
 | 
			
		||||
            enabled: False
 | 
			
		||||
            enabled: True
 | 
			
		||||
            boundaries: [3,4,5,6]
 | 
			
		||||
            gamma: 20
 | 
			
		||||
        backflow_boundaries: [3,4,5,6]
 | 
			
		||||
@@ -159,27 +160,28 @@ estimation:
 | 
			
		||||
        #- 
 | 
			
		||||
        #    id: 3
 | 
			
		||||
        #    type: 'windkessel'
 | 
			
		||||
        #    mode: 'Rd'
 | 
			
		||||
        #    initial_stddev: 1
 | 
			
		||||
        - 
 | 
			
		||||
            id: 4
 | 
			
		||||
            type: 'windkessel'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            initial_stddev: 1
 | 
			
		||||
            mode: 'Rd'
 | 
			
		||||
            initial_stddev: 0.5
 | 
			
		||||
        - 
 | 
			
		||||
            id: 5
 | 
			
		||||
            type: 'windkessel'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            initial_stddev: 1
 | 
			
		||||
            mode: 'Rd'
 | 
			
		||||
            initial_stddev: 0.5
 | 
			
		||||
        - 
 | 
			
		||||
            id: 6
 | 
			
		||||
            type: 'windkessel'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            initial_stddev: 1
 | 
			
		||||
            mode: 'Rd'
 | 
			
		||||
            initial_stddev: 0.5
 | 
			
		||||
        - 
 | 
			
		||||
            id: 2
 | 
			
		||||
            type: 'dirichlet'
 | 
			
		||||
            parameters: 'U'
 | 
			
		||||
            initial_stddev: 1
 | 
			
		||||
            initial_stddev: 0.5
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    measurements:
 | 
			
		||||
@@ -187,13 +189,13 @@ estimation:
 | 
			
		||||
            mesh: '/home/yeye/NuMRI/kalman/meshes/coaortaH3_leo2.0.h5'
 | 
			
		||||
            #mesh: './meshes/coaortaH1.h5'
 | 
			
		||||
            fe_degree: 1
 | 
			
		||||
            #xdmf_file: 'measurements/aorta_dt1ms/Perturbation/Mg15V70/u_all.xdmf'
 | 
			
		||||
            #file_root: 'measurements/aorta_dt1ms/Perturbation/Mg15V70/u{i}.h5'
 | 
			
		||||
            xdmf_file: 'measurements/aorta_exp_dt1ms/u_all.xdmf'
 | 
			
		||||
            file_root: 'measurements/aorta_exp_dt1ms/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_exp_dt1ms/u_all.xdmf'
 | 
			
		||||
            #file_root: 'measurements/aorta_exp_dt1ms/u{i}.h5'
 | 
			
		||||
            indices: 0 # indices of checkpoints to be processed. 0 == all
 | 
			
		||||
            velocity_direction: [0,0,1]
 | 
			
		||||
            noise_stddev: 45     # standard deviation of Gaussian noise
 | 
			
		||||
            noise_stddev: 16.84     # standard deviation of Gaussian noise
 | 
			
		||||
    
 | 
			
		||||
    roukf:
 | 
			
		||||
        particles: 'simplex' # unique or simplex
 | 
			
		||||
 
 | 
			
		||||
@@ -1,209 +0,0 @@
 | 
			
		||||
 | 
			
		||||
mesh: './meshes/coaortaH1.h5'
 | 
			
		||||
# Physical parameters of the fluid  
 | 
			
		||||
fluid:
 | 
			
		||||
    density: 1.2
 | 
			
		||||
    dynamic_viscosity: 0.035
 | 
			
		||||
    stokes: False
 | 
			
		||||
    implicit_windkessel: False
 | 
			
		||||
 | 
			
		||||
io:
 | 
			
		||||
    write_path: 'results/exp_0.1ms'
 | 
			
		||||
    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: 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  #REFERENCE 120
 | 
			
		||||
            U: 100 
 | 
			
		||||
            #U: 150 #Pa/Pb
 | 
			
		||||
            #U: 40 #Pc
 | 
			
		||||
            Th: 0.36
 | 
			
		||||
            beta: 70
 | 
			
		||||
            t: 0
 | 
			
		||||
    - 
 | 
			
		||||
        id: 1
 | 
			
		||||
        type: 'dirichlet'
 | 
			
		||||
        value: ['0','0','0']
 | 
			
		||||
    - 
 | 
			
		||||
        id: 3
 | 
			
		||||
        type: 'windkessel'
 | 
			
		||||
        parameters:
 | 
			
		||||
            R_p: 200
 | 
			
		||||
            C: 0.0004
 | 
			
		||||
            R_d: 4800
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
    - 
 | 
			
		||||
        id: 4
 | 
			
		||||
        type: 'windkessel'
 | 
			
		||||
        parameters:
 | 
			
		||||
            #R_p: 480
 | 
			
		||||
            R_p: 480
 | 
			
		||||
            #C: 0.0004  #  REFERENCE
 | 
			
		||||
            C: 0.001  #  REFERENCE
 | 
			
		||||
            #C: 0.0005   # Pa
 | 
			
		||||
            #C: 0.0010   # Pb
 | 
			
		||||
            #C: 0.0001   # Pc
 | 
			
		||||
            #C: 0.0008   # Pg
 | 
			
		||||
            #R_d: 7200  # REFERENCE
 | 
			
		||||
            R_d: 15000  # REFERENCE
 | 
			
		||||
            #R_d:  8760  #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000  #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
    - 
 | 
			
		||||
        id: 5
 | 
			
		||||
        type: 'windkessel'
 | 
			
		||||
        parameters:
 | 
			
		||||
            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: 40000 
 | 
			
		||||
            #R_d:  8760  #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000 #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
    - 
 | 
			
		||||
        id: 6
 | 
			
		||||
        type: 'windkessel'
 | 
			
		||||
        parameters:
 | 
			
		||||
            R_p: 520
 | 
			
		||||
            C: 0.0003 # REFERENCE
 | 
			
		||||
            #C: 0.0005 #Pa
 | 
			
		||||
            #C: 0.0010 #Pb
 | 
			
		||||
            #C: 0.0001 #Pc
 | 
			
		||||
            R_d: 11520 # REFERENCE
 | 
			
		||||
            #R_d: 35000
 | 
			
		||||
            #R_d:  8760 #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000 #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 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.0001
 | 
			
		||||
    write_dt: 0.001
 | 
			
		||||
    checkpoint_dt:  0.001 # <= 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: False
 | 
			
		||||
            boundaries: [3,4,5,6]
 | 
			
		||||
            gamma: 20
 | 
			
		||||
        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'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            initial_stddev: 1
 | 
			
		||||
        - 
 | 
			
		||||
            id: 5
 | 
			
		||||
            type: 'windkessel'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            initial_stddev: 1
 | 
			
		||||
        - 
 | 
			
		||||
            id: 6
 | 
			
		||||
            type: 'windkessel'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            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'
 | 
			
		||||
            fe_degree: 1
 | 
			
		||||
            #xdmf_file: 'measurements/aorta_dt1ms/Perturbation/Mg15V70/u_all.xdmf'
 | 
			
		||||
            #file_root: 'measurements/aorta_dt1ms/Perturbation/Mg15V70/u{i}.h5'
 | 
			
		||||
            xdmf_file: 'measurements/aorta_exp_dt1ms/u_all.xdmf'
 | 
			
		||||
            file_root: 'measurements/aorta_exp_dt1ms/u{i}.h5'
 | 
			
		||||
            indices: 0 # indices of checkpoints to be processed. 0 == all
 | 
			
		||||
            velocity_direction: [0,0,1]
 | 
			
		||||
            noise_stddev: 45     # standard deviation of Gaussian noise
 | 
			
		||||
    
 | 
			
		||||
    roukf:
 | 
			
		||||
        particles: 'simplex' # unique or simplex
 | 
			
		||||
        observation_operator: 'postprocessing'         #state or postprocessing
 | 
			
		||||
        reparameterize: True
 | 
			
		||||
        ODV_functional:
 | 
			
		||||
            enable: False
 | 
			
		||||
            VENC: 138
 | 
			
		||||
@@ -1,209 +0,0 @@
 | 
			
		||||
 | 
			
		||||
mesh: './meshes/coaortaH1.h5'
 | 
			
		||||
# Physical parameters of the fluid  
 | 
			
		||||
fluid:
 | 
			
		||||
    density: 1.2
 | 
			
		||||
    dynamic_viscosity: 0.035
 | 
			
		||||
    stokes: False
 | 
			
		||||
    implicit_windkessel: True
 | 
			
		||||
 | 
			
		||||
io:
 | 
			
		||||
    write_path: 'results/impl_0.1ms'
 | 
			
		||||
    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: 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  #REFERENCE 120
 | 
			
		||||
            U: 100
 | 
			
		||||
            #U: 150 #Pa/Pb
 | 
			
		||||
            #U: 40 #Pc
 | 
			
		||||
            Th: 0.36
 | 
			
		||||
            beta: 70
 | 
			
		||||
            t: 0
 | 
			
		||||
    - 
 | 
			
		||||
        id: 1
 | 
			
		||||
        type: 'dirichlet'
 | 
			
		||||
        value: ['0','0','0']
 | 
			
		||||
    - 
 | 
			
		||||
        id: 3
 | 
			
		||||
        type: 'windkessel'
 | 
			
		||||
        parameters:
 | 
			
		||||
            R_p: 200
 | 
			
		||||
            C: 0.0004
 | 
			
		||||
            R_d: 4800
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
    - 
 | 
			
		||||
        id: 4
 | 
			
		||||
        type: 'windkessel'
 | 
			
		||||
        parameters:
 | 
			
		||||
            #R_p: 480
 | 
			
		||||
            R_p: 480
 | 
			
		||||
            #C: 0.0004  #  REFERENCE
 | 
			
		||||
            C: 0.001  #  REFERENCE
 | 
			
		||||
            #C: 0.0005   # Pa
 | 
			
		||||
            #C: 0.0010   # Pb
 | 
			
		||||
            #C: 0.0001   # Pc
 | 
			
		||||
            #C: 0.0008   # Pg
 | 
			
		||||
            #R_d: 7200  # REFERENCE
 | 
			
		||||
            R_d: 15000  # REFERENCE
 | 
			
		||||
            #R_d:  8760  #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000  #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
    - 
 | 
			
		||||
        id: 5
 | 
			
		||||
        type: 'windkessel'
 | 
			
		||||
        parameters:
 | 
			
		||||
            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: 40000 
 | 
			
		||||
            #R_d:  8760  #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000 #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 1333.223874   
 | 
			
		||||
    - 
 | 
			
		||||
        id: 6
 | 
			
		||||
        type: 'windkessel'
 | 
			
		||||
        parameters:
 | 
			
		||||
            R_p: 520
 | 
			
		||||
            C: 0.0003 # REFERENCE
 | 
			
		||||
            #C: 0.0005 #Pa
 | 
			
		||||
            #C: 0.0010 #Pb
 | 
			
		||||
            #C: 0.0001 #Pc
 | 
			
		||||
            R_d: 11520 # REFERENCE
 | 
			
		||||
            #R_d: 35000
 | 
			
		||||
            #R_d:  8760 #Pa
 | 
			
		||||
            #R_d: 17520 #Pb x2
 | 
			
		||||
            #R_d: 4000 #Pc
 | 
			
		||||
            p0: 85
 | 
			
		||||
            conv: 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.0001
 | 
			
		||||
    write_dt: 0.001
 | 
			
		||||
    checkpoint_dt:  0.001 # <= 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: False
 | 
			
		||||
            boundaries: [3,4,5,6]
 | 
			
		||||
            gamma: 20
 | 
			
		||||
        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'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            initial_stddev: 1
 | 
			
		||||
        - 
 | 
			
		||||
            id: 5
 | 
			
		||||
            type: 'windkessel'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            initial_stddev: 1
 | 
			
		||||
        - 
 | 
			
		||||
            id: 6
 | 
			
		||||
            type: 'windkessel'
 | 
			
		||||
            mode: 'RdC'
 | 
			
		||||
            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'
 | 
			
		||||
            fe_degree: 1
 | 
			
		||||
            #xdmf_file: 'measurements/aorta_dt1ms/Perturbation/Mg15V70/u_all.xdmf'
 | 
			
		||||
            #file_root: 'measurements/aorta_dt1ms/Perturbation/Mg15V70/u{i}.h5'
 | 
			
		||||
            xdmf_file: 'measurements/aorta_exp_dt1ms/u_all.xdmf'
 | 
			
		||||
            file_root: 'measurements/aorta_exp_dt1ms/u{i}.h5'
 | 
			
		||||
            indices: 0 # indices of checkpoints to be processed. 0 == all
 | 
			
		||||
            velocity_direction: [0,0,1]
 | 
			
		||||
            noise_stddev: 45     # standard deviation of Gaussian noise
 | 
			
		||||
    
 | 
			
		||||
    roukf:
 | 
			
		||||
        particles: 'simplex' # unique or simplex
 | 
			
		||||
        observation_operator: 'postprocessing'         #state or postprocessing
 | 
			
		||||
        reparameterize: True
 | 
			
		||||
        ODV_functional:
 | 
			
		||||
            enable: False
 | 
			
		||||
            VENC: 138
 | 
			
		||||
		Reference in New Issue
	
	Block a user