Skip to content

Commit

Permalink
update in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierr committed Dec 18, 2024
1 parent 0d7bdbe commit af058ec
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 12 deletions.
Binary file modified Documentation/publishedExamples/runProtonicMembrane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions Documentation/publishedExamples/runProtonicMembrane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,23 +167,22 @@ Plot of the conductivity

Evolution of the Faradic efficiency
===================================

We increase the current density from 0 to 1 A/cm^2 and plot the faraday efficiency.
We sample the current value from 0 to 1 A/cm^2
We sample the current value from 0 to 1 A/cm^2.

.. code-block:: matlab
Is = linspace(0, 1*ampere/((centi*meter)^2), 20);
We run the simulation for each current value and collect the results in the :code:`endstates`
We run the simulation for each current value and collect the results in the :code:`endstates`.

.. code-block:: matlab
endstates = {};
for iI = 1 : numel(Is)
model.Control.I = Is(iI);
[~, states, report] = simulateScheduleAD(state0, model, schedule, 'NonLinearSolver', nls);
[~, states, report] = simulateScheduleAD(state0, model, schedule);
state = states{end};
state = model.addVariables(state, schedule.control);
Expand Down
Binary file modified Documentation/publishedExamples/runProtonicMembrane_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/publishedExamples/runProtonicMembrane_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/publishedExamples/runProtonicMembrane_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/publishedExamples/runProtonicMembrane_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/publishedExamples/runProtonicMembrane_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/publishedExamples/runProtonicMembrane_06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/publishedExamples/runProtonicMembrane_07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 6 additions & 8 deletions Documentation/publishedExamples/runProtonicMembrane_source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Source code for runProtonicMembrane
% We setup the initial state using a default setup included in the model
state0 = model.setupInitialState();
%% Schedule schedule
%% Schedule
% We setup the schedule, which means the timesteps and also the control we want to use. In this case we use current
% control and the current equal to zero (see here :battmofile:`here<ProtonicMembrane/protonicMembrane.json#86>`).
%
Expand Down Expand Up @@ -119,24 +119,22 @@ Source code for runProtonicMembrane
xlabel('x / m')
xlabel('log(\sigma/Siemens)')
%% Evolution of Faradic efficiency
% We increase the current density from 0 to 1 A/cm^2 and plot the faraday efficiency
%% Evolution of the Faradic efficiency
% We increase the current density from 0 to 1 A/cm^2 and plot the faraday efficiency.
%
%%
% We sample the current value from 0 to 1 A/cm^2
% We sample the current value from 0 to 1 A/cm^2.
%
Is = linspace(0, 1*ampere/((centi*meter)^2), 20);
%%
% We run the simulation for each current value and collect the results in the :code:`endstates`
% We run the simulation for each current value and collect the results in the :code:`endstates`.
%
endstates = {};
for iI = 1 : numel(Is)
model.Control.I = Is(iI);
[~, states, report] = simulateScheduleAD(state0, model, schedule, 'NonLinearSolver', nls);
[~, states, report] = simulateScheduleAD(state0, model, schedule);
state = states{end};
state = model.addVariables(state, schedule.control);
Expand Down

0 comments on commit af058ec

Please sign in to comment.