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
ab980bbf
Commit
ab980bbf
authored
4 years ago
by
Lars Hubatsch
Browse files
Options
Downloads
Patches
Plain Diff
Cosmetic changes.
parent
1fee104a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prob_laplace.m
+22
-14
22 additions, 14 deletions
prob_laplace.m
with
22 additions
and
14 deletions
prob_laplace.m
+
22
−
14
View file @
ab980bbf
...
...
@@ -68,7 +68,9 @@ for i = 1:length(T)
csvwrite
([
'sol_X73_'
,
num2str
(
x0
(
i
)),
'.csv'
],
T_diff_x0
(
i
)
.
sol
(:,
:));
end
%% Frank's/Stefano via Laplace transform vs Fokker Planck
%% %%%%%% Frank's/Stefano via Laplace transform vs Fokker Planck %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t
=
linspace
(
0
,
10
,
1000
);
tic
T_mov
=
Ternary_model
(
0
,
'Gauss'
,
{
-
6
,
b
(
7
/
3
,
10
^-
15
),
0.5
,
e
(
7
/
3
),
...
...
...
@@ -105,7 +107,10 @@ for i = 1:100%length(T_mov.t)
% print([num2str(i),'.png'],'-dpng')
shg
;
pause
();
end
%% Moving boundary
%% %%%%%%%%%%%%%%%%%%% MOVING BOUNDARY TIME COURSE %%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t
=
linspace
(
0
,
10
,
9000
);
tic
T_mov
=
Ternary_model
(
0
,
'phi_tot'
,
{
-
10
,
b
(
7
/
3
,
10
^-
6
),
0.5
,
e
(
7
/
3
),
...
...
...
@@ -140,7 +145,10 @@ s_dot(i) = sum(diff(T_mov.x).*f.^2./(g0.*u_interp));
end
csvwrite
([
s
,
'Mov_Bou_Flux.csv'
],
[
x_interp
;
f
])
csvwrite
([
s
,
'Mov_Bou_Entr.csv'
],
[
T_mov
.
t
;
s_dot
])
%% FRAP jump length
%% %%%%%%%%%%%%%%%%%%%%%% FRAP TIME COURSE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t
=
linspace
(
0
,
5
,
300
);
T_mov
=
Ternary_model
(
0
,
'FRAP'
,
{
-
5
,
b
(
7
/
3
,
10
^-
6
),
0.5
,
e
(
7
/
3
),
...
0
,
1
,
10
,
7
,
0
,
'Constituent'
},
t
,
0.2
);
...
...
@@ -187,25 +195,25 @@ T_prec(5).plot_sim('plot', 10, 'blue');
%% Check whether partitioning factor is kept throughout simulation.
% This should work for steep boundaries.
for
i
=
1
:
4
pks_min
=
findpeaks
(
-
T_prec
(
5
)
.
sol
(
i
,
:));
pks_max
=
findpeaks
(
T_prec
(
5
)
.
sol
(
i
,
:));
pks_max
(
1
)/
pks_min
(
1
)
pks_min
=
findpeaks
(
-
T_prec
(
5
)
.
sol
(
i
,
:));
pks_max
=
findpeaks
(
T_prec
(
5
)
.
sol
(
i
,
:));
pks_max
(
1
)/
pks_min
(
1
)
end
%%
Solve integrals for jump length distribution @ steady state.
%
Set parameters
%%
%%%%%%%%%%%%%%%%% STEADY STATE JUMP LENGTH DISTRIBUTION %%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
params
=
{
-
5
,
b
(
7.7
/
3
,
10
^-
6
),
0.5
,
e
(
7.7
/
3
),
0
,
1
,
10
,
7
,
0
,
'Constituent'
};
t
=
[
0
,
0.05
,
0.1
];
x0
=
5.0
:
0.002
:
7.01
;
%% Run simulations with 'delta' IC across outside
T
=
{};
parfor
i
=
1
:
length
(
x0
)
tic
T
{
i
}
=
Ternary_model
(
0
,
'Gauss'
,
params
,
t
,
0.2
);
T
{
i
}
.
x0
=
x0
(
i
);
T
{
i
}
.
solve_tern_frap
();
toc
tic
T
{
i
}
=
Ternary_model
(
0
,
'Gauss'
,
params
,
t
,
0.2
);
T
{
i
}
.
x0
=
x0
(
i
);
T
{
i
}
.
solve_tern_frap
();
toc
end
% save prob_laplace_X_7_7_short_2
%% Calculate probabilities for each jump length in ls.
...
...
@@ -213,7 +221,7 @@ ls = 0.0005:0.005:2;
p
=
nan
(
1
,
length
(
ls
));
tic
parfor
i
=
1
:
length
(
ls
)
p
(
i
)
=
int_prob
(
ls
(
i
),
T
,
x0
,
0
);
p
(
i
)
=
int_prob
(
ls
(
i
),
T
,
x0
,
0
);
end
toc
%% Test integrals
...
...
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