Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frap Theory
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hubatsch
Frap Theory
Commits
8cd4f95d
Commit
8cd4f95d
authored
5 years ago
by
Lars Hubatsch
Browse files
Options
Downloads
Patches
Plain Diff
Making initial condition a parameter.
parent
fe020ac8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
@Ternary_model/Ternary_model.m
+3
-1
3 additions, 1 deletion
@Ternary_model/Ternary_model.m
@Ternary_model/solve_tern_frap.m
+21
-20
21 additions, 20 deletions
@Ternary_model/solve_tern_frap.m
with
24 additions
and
21 deletions
@Ternary_model/Ternary_model.m
+
3
−
1
View file @
8cd4f95d
...
...
@@ -7,6 +7,7 @@ classdef Ternary_model < handle
properties
pa
=
'/Users/hubatsch/ownCloud/Dropbox_Lars_Christoph/DropletFRAP/FRAP_paper/'
;
g0
ic
=
'FRAP'
sol
t
x
...
...
@@ -20,8 +21,9 @@ classdef Ternary_model < handle
o_g0
=
0.2
;
end
methods
function
T
=
Ternary_model
(
t
,
params
)
function
T
=
Ternary_model
(
ic
,
params
,
t
)
T
.
t
=
t
;
T
.
ic
=
ic
;
if
~
isempty
(
params
)
T
.
a
=
params
(
1
);
T
.
b
=
params
(
2
);
...
...
This diff is collapsed.
Click to expand it.
@Ternary_model/solve_tern_frap.m
+
21
−
20
View file @
8cd4f95d
function
solve_tern_frap
(
T
)
%SOLVE_TERN_FRAP solves Fokker Planck equation for ternary FRAP
% Assumes fixed profile of phi_tot
fh_ic
=
@
(
x
)
flory_ic
(
x
,
T
.
a
,
T
.
u0
);
fh_ic
=
@
(
x
)
flory_ic
(
x
,
T
.
a
,
T
.
u0
,
T
.
ic
);
fh_bc
=
@
(
xl
,
ul
,
xr
,
ur
,
t
)
flory_bc
(
xl
,
ul
,
xr
,
ur
,
t
,
T
.
u0
);
fh_pde
=
@
(
x
,
t
,
u
,
dudx
)
flory_hugg_pde
(
x
,
t
,
u
,
dudx
,
T
.
a
,
T
.
b
,
T
.
e
,
T
.
u0
,
...
T
.
e_g0
,
T
.
o_g0
);
...
...
@@ -23,27 +23,28 @@ f = g0*(1-pt)/pt*(pt*dudx-u*gra_a);
s
=
0
;
end
function
u
=
flory_ic
(
x
,
a
,
u0
)
function
u
=
flory_ic
(
x
,
a
,
u0
,
ic
)
if
strcmp
(
ic
,
'FRAP'
)
% FRAP initial condition
if
x
<
-
a
;
u
=
0.0
;
else
;
u
=
u0
;
end
% Peak outside initial condition
%
if (x < -a+0.2) && (x > -a+0.1); u = 10; else; u = 0; end
%
u = 0.3;
%
u = phi_tot(x, -50, 1)
;
%%
%% Frank/Jonathan/Stefano solution to the transfer/rate problem via Laplace transform
% x0 = 3
;
% D_m = 0.11;%g0(1)*(1-u0-e)/(u0+e); % to make equal to ternary FRAP
% D_p = 0.342;%g0(end)*(1-u0)/u0;
% ga = 1/9
;
% p_out = @(D_p, D_m, ga, x0, x, t) 1./(2*sqrt(D_p*pi*t))*...
%
(exp(-(x+x0).^2./(4*D_p*t))*(ga*sqrt(D_p)-sqrt(D_m))./...
%
(ga*sqrt(D_p)+sqrt(D_m))+exp(-(x-x0).^2./(4*D_p*t)));
% if x > -a
%
u = p_out(D_p, D_m, ga, x0, x, 3/100);
%
else
%
u = 0
;
%
end
elseif
strcmp
(
ic
,
'Gauss'
)
% Frank/Jonathan/Stefano solution to the transfer/rate problem via
% Laplace transform
x0
=
3
;
D_m
=
0.11
;
%g0(1)*(1-u0-e)/(u0+e); % to make equal to ternary FRAP
D_p
=
0.342
;
%g0(end)*(1-u0)/u0;
ga
=
1
/
9
;
p_out
=
@
(
D_p
,
D_m
,
ga
,
x0
,
x
,
t
)
1.
/(
2
*
sqrt
(
D_p
*
pi
*
t
))
*
...
(
exp
(
-
(
x
+
x0
)
.^
2.
/(
4
*
D_p
*
t
))
*
(
ga
*
sqrt
(
D_p
)
-
sqrt
(
D_m
))
.
/
...
(
ga
*
sqrt
(
D_p
)
+
sqrt
(
D_m
))
+
exp
(
-
(
x
-
x0
)
.^
2.
/(
4
*
D_p
*
t
)))
;
if
x
>
-
a
u
=
p_out
(
D_p
,
D_m
,
ga
,
x0
,
x
,
3
/
100
);
else
u
=
0
;
end
else
disp
(
'Initial condition not supported'
)
;
end
end
function
[
pl
,
ql
,
pr
,
qr
]
=
flory_bc
(
xl
,
ul
,
xr
,
ur
,
t
,
u0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment