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
1e4abf93
Commit
1e4abf93
authored
4 years ago
by
Lars Hubatsch
Browse files
Options
Downloads
Patches
Plain Diff
WIP: Matlab jump length distribution moving boundary.
parent
475f7d5b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
@Ternary_model/create_mesh.m
+1
-1
1 addition, 1 deletion
@Ternary_model/create_mesh.m
@Ternary_model/plot_sim.m
+1
-1
1 addition, 1 deletion
@Ternary_model/plot_sim.m
prob_laplace.m
+41
-6
41 additions, 6 deletions
prob_laplace.m
with
43 additions
and
8 deletions
@Ternary_model/create_mesh.m
+
1
−
1
View file @
1e4abf93
...
...
@@ -30,6 +30,6 @@ if strcmp(T.mode, 'Constituent')
T
.
x
(
ind
+
21
:
end
)];
end
elseif
strcmp
(
T
.
mode
,
'Client'
)
T
.
x
=
linspace
(
0
,
20
,
24000
);
T
.
x
=
linspace
(
0
,
T
.
system_size
,
24000
);
end
end
This diff is collapsed.
Click to expand it.
@Ternary_model/plot_sim.m
+
1
−
1
View file @
1e4abf93
...
...
@@ -27,7 +27,7 @@ elseif strcmp(mode, 'plot')
figure
(
20
);
cla
;
hold
on
;
xlim
([
-
inf
,
6.0
]);
ylim
([
-
inf
,
max
(
T
.
sol
(:))]);
%
xlim([-inf, 6.0]); ylim([-inf, max(T.sol(:))]);
ax
=
gca
;
ax
.
FontSize
=
12
;
xlabel
(
'x [\mum]'
);
ylabel
(
'volume fraction'
);
...
...
This diff is collapsed.
Click to expand it.
prob_laplace.m
+
41
−
6
View file @
1e4abf93
...
...
@@ -113,15 +113,16 @@ end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t
=
linspace
(
0
,
10
,
9000
);
tic
T_mov
=
Ternary_model
(
0
,
'phi_tot'
,
{
-
10
,
b
(
7
/
3
,
10
^-
6
),
0.5
,
e
(
7
/
3
),
...
0
,
1
,
10
,
7
,
0.5
,
'Client'
},
t
,
0
);
params_mov_bound
=
{
-
10
,
b
(
7
/
3
,
10
^-
6
),
0.5
,
e
(
7
/
3
),
...
0
,
1
,
20
,
7
,
0.5
,
'Client'
};
T_mov
=
Ternary_model
(
0
,
'phi_tot'
,
params_mov_bound
,
t
,
0
);
T_mov
.
solve_tern_frap
();
toc
norm_fac
=
1
/
sum
(
diff
(
T_mov
.
x
)
.*
...
(
T_mov
.
sol
(
1
,
1
:
end
-
1
)
+
T_mov
.
sol
(
1
,
2
:
end
))/
2
);
s
=
'~/Nextcloud/Langevin_vs_MeanField/Data_Figs_FokkPla/'
;
csvwrite
([
s
,
'MovingBound.csv'
],
[
T_mov
.
x
', norm_fac*T_mov.sol(1, :)'
,
...
norm_fac
*
T_mov
.
sol
(
end
,
:)
'
])
%
csvwrite([s, 'MovingBound.csv'], [T_mov.x', norm_fac*T_mov.sol(1, :)',...
%
norm_fac*T_mov.sol(end, :)'])
%% Flux and entropy change for moving boundary
chi_phi
=
-
4.530864768482371
;
s_dot
=
zeros
(
1
,
length
(
T_mov
.
t
));
...
...
@@ -143,8 +144,42 @@ s_dot(i) = sum(diff(T_mov.x).*f.^2./(g0.*u_interp));
% [0, T_mov.system_size, min(f(:)), max(f)])
% pause()
end
csvwrite
([
s
,
'Mov_Bou_Flux.csv'
],
[
x_interp
;
f
])
csvwrite
([
s
,
'Mov_Bou_Entr.csv'
],
[
T_mov
.
t
;
s_dot
])
% csvwrite([s, 'Mov_Bou_Flux.csv'], [x_interp; f])
% csvwrite([s, 'Mov_Bou_Entr.csv'], [T_mov.t; s_dot])
%% MOVING BOUNDARY JUMP LENGTH DISTRIBUTION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
direction
=
1
;
% 1: jump from left to right, -1: jump from right to left.
x0
=
sort
(
10
-
direction
*
(
0
:
0.02
:
4.01
));
t_snap
=
repmat
((
0.25
:
0.5
:
9.75
)
'
,
1
,
length
(
x0
));
si_t
=
size
(
t_snap
);
x0
=
sort
(
10
-
T_mov
.
v
*
t_snap
-
direction
*
repmat
(
0
:
0.02
:
4.01
,
[
si_t
(
1
),
1
]),
2
);
%% Run simulations for 'delta' IC across outside
F
=
{};
v
=
T_mov
.
v
;
for
i
=
1
:
si_t
(
2
)
tic
parfor
j
=
1
:
si_t
(
1
)
F
{
i
,
j
}
=
Ternary_model
(
0
,
'Gauss'
,
params_mov_bound
,
t
,
0
);
F
{
i
,
j
}
=
Ternary_model
(
0
,
'Gauss'
,
params
,
t
,
0.1
);
F
{
i
,
j
}
.
x0
=
x0
(
j
,
i
);
F
{
i
,
j
}
.
a
=
-
10
+
v
*
t_snap
(
i
);
F
{
i
,
j
}
.
solve_tern_frap
();
end
toc
end
%% Calc. probs. for each jump length in ls and sum over time
%%% THIS PART DOES NOT WORK YET!!!
ls
=
-
direction
*
(
0.001
:
0.04
:
4
);
n_T
=
45
;
p
=
nan
(
length
(
ls
),
n_T
);
for
j
=
1
:
n_T
tic
parfor
i
=
1
:
length
(
ls
)
p
(
i
,
j
)
=
int_prob
(
ls
(
i
),
F
,
x0
,
direction
,
j
,
T_mov
,
5
);
end
toc
end
% save prob_laplace_X_7_3_FRAP_in_out
%% %%%%%%%%%%%%%%%%%%%%%% FRAP TIME COURSE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
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