press new

This commit is contained in:
jeremias 2021-03-29 10:45:02 +02:00
parent 842a3fbcc6
commit 74785679cb
5 changed files with 148 additions and 224 deletions

View File

@ -72,7 +72,7 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
if bnd_c['id'] == bnd_set['id']: if bnd_c['id'] == bnd_set['id']:
ids.append(bnd_c['id']) ids.append(bnd_c['id'])
current_val.append(bnd_set['value'][0]) current_val.append(bnd_set['value'][0])
labels.append('R_' + str(bnd_c['id'])) labels.append('$R_' + str(bnd_c['id']))
elif 'dirichlet' in bnd_c['type']: elif 'dirichlet' in bnd_c['type']:
current_val.append(inputfile['boundary_conditions'][1]['parameters']['U']) current_val.append(inputfile['boundary_conditions'][1]['parameters']['U'])
@ -105,13 +105,17 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
for i in range(dim): for i in range(dim):
axes.plot(t, theta[:, i] + 1.5*i, '-', color=col_,label=legends_)
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)
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]), 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, theta[:, i] + 1.5*i + np.sqrt(P[:, i, i]), alpha=0.3,
color=col_) color=col_)
true_level = np.log(true_values[ids[i]]/current_val[i])/np.log(2)
axes.plot(t,1.5*i + t*0 + true_level , color=col_,ls='--') axes.plot(t,1.5*i + t*0 + true_level , color=col_,ls='--')
col_ = next(col) col_ = next(col)
legends_=next(legends) legends_=next(legends)

View File

@ -4,9 +4,10 @@ mesh: './meshes/coaortaH1.h5'
fluid: fluid:
density: 1.2 density: 1.2
dynamic_viscosity: 0.035 dynamic_viscosity: 0.035
stokes: False
io: io:
write_path: 'results/aorta_master' write_path: 'results/aorta'
restart: restart:
path: '' # './projects/nse_coa3d/results/test_restart2/' path: '' # './projects/nse_coa3d/results/test_restart2/'
time: 0 time: 0
@ -25,38 +26,40 @@ boundary_conditions:
type: 'dirichlet' 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))'] 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: parameters:
U: 30 U: 100
Th: 0.35 Th: 0.35
t: 0 t: 0
- -
id: 3 id: 3
type: 'windkessel' type: 'windkessel'
value: [10,0,0] #value: [10,0,0]
p0: [0,1333.223874] value: [10,0.0008,2400]
#value: [10,1000,0.01] p0: [80,1333.223874]
#p0: [47,1333.223874] #p0: [0,1333.223874]
- -
id: 4 id: 4
type: 'windkessel' type: 'windkessel'
value: [250,0,0] #value: [60,0,0]
p0: [0,1333.223874] #value: [250,0,0]
#value: [250,8000,0.0001] value: [60,0.00034,4200]
#p0: [47,1333.223874] p0: [80,1333.223874]
#p0: [0,1333.223874]
- -
id: 5 id: 5
type: 'windkessel' type: 'windkessel'
value: [250,0,0] #value: [220,0,0]
p0: [0,1333.223874] #value: [250,0,0]
#value: [250,8000,0.0001] value: [220,0.00034,11000]
#p0: [47,1333.223874] p0: [80,1333.223874]
#p0: [0,1333.223874]
- -
id: 6 id: 6
type: 'windkessel' type: 'windkessel'
value: [250,0,0] #value: [160,0,0]
p0: [0,1333.223874] #value: [250,0,0]
#value: [250,8000,0.0001] value: [160,0.00034,7800]
#p0: [47,1333.223874] p0: [80,1333.223874]
#p0: [0,1333.223874]
timemarching: timemarching:
velocity_pressure_coupling: 'fractionalstep' # monolithic, fractionalstep velocity_pressure_coupling: 'fractionalstep' # monolithic, fractionalstep
@ -96,7 +99,7 @@ fem:
convection_skew_symmetric: True # aka Temam term convection_skew_symmetric: True # aka Temam term
stabilization: stabilization:
forced_normal: forced_normal:
enabled: True enabled: False
boundaries: [6] boundaries: [6]
gamma: 10 gamma: 10
backflow_boundaries: [3,4,5,6] backflow_boundaries: [3,4,5,6]
@ -120,38 +123,38 @@ linear_solver:
estimation: estimation:
boundary_conditions: boundary_conditions:
- #-
id: 3 # id: 3
type: 'windkessel' # type: 'windkessel'
initial_stddev: 1 # initial_stddev: 1
- -
id: 4 id: 4
type: 'windkessel' type: 'windkessel'
initial_stddev: 1 initial_stddev: 1
- #-
id: 5 # id: 5
type: 'windkessel' # type: 'windkessel'
initial_stddev: 1 # initial_stddev: 1
- #-
id: 6 # id: 6
type: 'windkessel' # type: 'windkessel'
initial_stddev: 1 # initial_stddev: 1
- #-
id: 2 # id: 2
type: 'dirichlet' # type: 'dirichlet'
parameters: 'U' # parameters: 'U'
initial_stddev: 1 # initial_stddev: 1
measurements: measurements:
- -
mesh: '/home/yeye/NuMRI/kalman/meshes/coaortaH3_leo2.0.h5' mesh: '/home/yeye/NuMRI/kalman/meshes/coaortaH3_leo2.0.h5'
fe_degree: 1 fe_degree: 1
xdmf_file: 'measurements/aorta_master_s100/u_all.xdmf' xdmf_file: 'measurements/aorta/u_all.xdmf'
file_root: 'measurements/aorta_master_s100/u{i}.h5' file_root: 'measurements/aorta/u{i}.h5'
indices: 0 # indices of checkpoints to be processed. 0 == all indices: 0 # indices of checkpoints to be processed. 0 == all
velocity_direction: ~ velocity_direction: ~
noise_stddev: 5 # standard deviation of Gaussian noise noise_stddev: 500 # standard deviation of Gaussian noise
roukf: roukf:
particles: 'simplex' # unique or simplex particles: 'simplex' # unique or simplex

View File

@ -1,172 +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 or update
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) + (t<=Tc)*(t>Th)*(-3.67949466208*U*sin(9*DOLFIN_PI*t/Th)*exp(-t*10))
- U*sin(DOLFIN_PI*(t-Tc)/Th)*(t>Tc)*(t<= Tc + Th)
+ (t<=2*Tc)*(t>Tc+Th)*(-3.67949466208*U*sin(9*DOLFIN_PI*(t-Tc)/Th)*exp(-(t-Tc)*10))
- U*sin(DOLFIN_PI*(t-2*Tc)/Th)*(t>2*Tc)*(t<= 2*Tc + Th)
+ (t<=3*Tc)*(t>2*Tc+Th)*(-3.67949466208*U*sin(9*DOLFIN_PI*(t-2*Tc)/Th)*exp(-(t-2*Tc)*10))
- U*sin(DOLFIN_PI*(t-3*Tc)/Th)*(t>3*Tc)*(t<= 3*Tc + Th)
+ (t<=4*Tc)*(t>3*Tc+Th)*(-3.67949466208*U*sin(9*DOLFIN_PI*(t-3*Tc)/Th)*exp(-(t-3*Tc)*10))
- U*sin(DOLFIN_PI*(t-4*Tc)/Th)*(t>4*Tc)*(t<= 4*Tc + Th)
+ (t<=5*Tc)*(t>4*Tc+Th)*(-3.67949466208*U*sin(9*DOLFIN_PI*(t-4*Tc)/Th)*exp(-(t-4*Tc)*10)) ']
parameters:
U: 100 #100
Th: 0.35
Tc: 0.8
t: 0
-
id: 3
type: 'windkessel'
value: [10,0,0]
#value: [10,0.0008,2400] # [R_p,C,R_d] SEPARAR
#p0: [80,1333.223874]
p0: [0,1333.223874]
-
id: 4
type: 'windkessel'
value: [60,0,0]
#value: [60,0.00034,4200]
#p0: [80,1333.223874]
p0: [0,1333.223874]
-
id: 5
type: 'windkessel'
value: [220,0,0]
#value: [220,0.00034,11000]
#p0: [80,1333.223874]
p0: [0,1333.223874]
-
id: 6
type: 'windkessel'
value: [160,0,0]
#value: [160,0.00034,7800]
#p0: [80,1333.223874]
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.002
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: False
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'
#mesh: './meshes/coaortaH1.h5'
fe_degree: 1
#xdmf_file: 'measurements/aorta_C/Perturbation/Ks12V50/u_all.xdmf'
#file_root: 'measurements/aorta_C/Perturbation/Ks12V50/u{i}.h5'
xdmf_file: 'measurements/aorta_s100/u_all.xdmf'
file_root: 'measurements/aorta_s100/u{i}.h5'
indices: 0 # indices of checkpoints to be processed. 0 == all
velocity_direction: ~
noise_stddev: 15 # standard deviation of Gaussian noise
roukf:
particles: 'simplex' # unique or simplex
observation_operator: 'postprocessing' #state or postprocessing
reparameterize: True
ODV_functional:
enable: False
VENC: 172 # 241,172

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -25,10 +25,9 @@
\usepackage{amssymb,graphicx,enumerate} \usepackage{amssymb,graphicx,enumerate}
\usepackage{subcaption} \usepackage{subcaption}
\usepackage{hyperref} \usepackage{hyperref}
\usepackage[normalem]{ulem} % for strike out command \sout \usepackage[normalem]{ulem} % for strike out command \sout
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning}
@ -98,7 +97,7 @@
\title[]{4D flow MRI in cardiovascular diseases} \title[]{4D flow MRI in the diagnosis of cardiovascular diseases}
%\author[Jeremías Garay Labra] %\author[Jeremías Garay Labra]
%{Jeremías Garay Labra} %{Jeremías Garay Labra}
\institute[University of Groningen] \institute[University of Groningen]
@ -118,13 +117,40 @@ University of Groningen\\[0.5cm]
% \onslide<1-> % \onslide<1->
\begin{frame}
\begin{figure}[!hbtp]
\includegraphics[height=0.5\textwidth]{images/aorta_healthy.jpg}
\end{figure}
\end{frame}
\begin{frame} \begin{frame}
\begin{figure}[!hbtp] \begin{figure}[!hbtp]
\includegraphics[height=0.6\textwidth]{images/aortic_stenosis.png} \includegraphics[height=0.6\textwidth]{images/aortic_stenosis_1.png}
\end{figure} \end{figure}
\end{frame} \end{frame}
\begin{frame}
\begin{figure}[!hbtp]
\includegraphics[height=0.6\textwidth]{images/aortic_stenosis_2.png}
\end{figure}
\end{frame}
\begin{frame}
\begin{figure}[!hbtp]
\includegraphics[height=0.6\textwidth]{images/aortic_stenosis_3.png}
\end{figure}
\end{frame}
\begin{frame}
\begin{figure}[!hbtp]
\includegraphics[height=0.6\textwidth]{images/aortic_stenosis_4.png}
\end{figure}
\end{frame}
\begin{frame} \begin{frame}
@ -145,10 +171,6 @@ University of Groningen\\[0.5cm]
\end{frame} \end{frame}
\begin{frame} \begin{frame}
\begin{figure}[!hbtp] \begin{figure}[!hbtp]
\begin{center} \begin{center}
@ -161,6 +183,31 @@ University of Groningen\\[0.5cm]
\begin{frame}
\begin{figure}
\centering
\tikzstyle{block} = [rectangle, draw, fill=blue!25,text width=15em, text centered, rounded corners, minimum height=15em, line width=1pt ]
\tikzstyle{block2} = [rectangle, draw, fill=blue!25,text width=4em, text centered, rounded corners, minimum height=2em, line width=1pt ]
\tikzstyle{line} = [draw, -latex', line width=1pt]
\tikzstyle{alert} = [text=red, fill=red!25, draw=red]
\begin{tikzpicture}[node distance = 2cm, auto]
% Place nodes
\node [block2] (mri) {velocity data \\ $\vec{u}$ };
\node [block, right of=mri, node distance=4.5cm] (NS) {Navier-Stokes equations \\[0.3cm]
$$\rho \frac{\partial \vec{u}}{\partial t} + \rho \vec{u} \cdot \nabla \vec{u} + \mu \Delta \vec{u} + \nabla p =0 $$ $$ \nabla \cdot \vec{u} = 0$$};
\node [block2,alert, right of=NS, node distance=4.5cm] (press) {pressure \\ $p$ };
% Draw edges
\path [line] (mri) -> (NS);
\path [line] (NS) -- (press);
\end{tikzpicture}
\end{figure}
\end{frame}
\begin{frame} \begin{frame}
\begin{figure}[!hbtp] \begin{figure}[!hbtp]
@ -172,6 +219,23 @@ University of Groningen\\[0.5cm]
\end{frame} \end{frame}
\begin{frame}
\begin{figure}[!hbtp]
\begin{center}
\includegraphics[height=0.6\textwidth]{images/p2.png}
\caption{\footnotesize reconstructed pressure using NS equations}
\end{center}
\end{figure}
\end{frame}
\begin{frame}
\begin{center}
\huge{Conclusions}
\end{center}
\end{frame}
@ -180,6 +244,31 @@ University of Groningen\\[0.5cm]
\begin{frame}
\begin{figure}[!hbtp]
\begin{center}
\includegraphics[height=0.5\textwidth]{images/catheter_curve.png}
\caption{\footnotesize Two different methods for pressure reconstruction (STE, PPE) against actual catheter data in two patients}
\end{center}
\end{figure}
\end{frame}
\begin{frame}
\title{Conclusion}
\begin{itemize}
\item \onslide<1-> New approach for addressing cardiovascular diagnosis is presented \\[0.3cm]
\item \onslide<2-> Consists in imagining the velocity of blood flows (4D flow)\\[0.3cm]
\item \onslide<3-> Main limitations so far:
\begin{itemize}
\item \onslide<4-> Difficulties in obtaining the special type of data needed
\item \onslide<5-> Practical resolutions are far from the desired ones
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame} \begin{frame}
\begin{center} \begin{center}
\huge{Thank you for your time!} \huge{Thank you for your time!}