First time here? Checkout the FAQ!
x
0 votes
by (120 points)
Thank you for your reply! We faced the problem of how to include additional value to the .model file. Specifically, we are still unable to obtain the V values (which are in reality W values) in the output of AlievPanfilov model.

We  added a new nodal() line into the script:

V; .external(V); .nodal();

The full script is shown below:

-----------------------------------------------------------

Script in .model file:

Vm; .external(Vm); .nodal();

Iion; .external(); .nodal();

V; .external(V); .nodal();

t_norm = 12.9; // 12.9 time units per ms

vm_norm = 100; // 1 voltage unit of U = 100 mV

vm_rest = -80; // resting leVolel for U=0

touAcm2=100/12.9;

V_init = 0;

Vm_init=vm_rest;

K = 8;

epsilon = 0.002;

a = 0.15;

group {

      mu1 = 0.2;

       mu2 = 0.3;

}.param();

U=(Vm-vm_rest)/vm_norm;

diff_V = -(epsilon+mu1V/(mu2+U))(V+KU(U-a-1))/t_norm;

Iion = (KU(U-a)(U-1)+UV)*touAcm2;

-----------------------------------------------------------

Then, we ran this:

    limpet_fe.py AlievPanfilov.model
    make_dynamic_model.sh AlievPanfilov
    bench.pt --load ./AlievPanfilov.so --imp AlievPanfilov --stim-curr 50 --numstim 4 --bcl 1000 --fout=Voltage

Unfortunately, we see the error of PETSC:

-----------------------------------------------------------

[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple MacOS to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Signal received
[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.17.1, Apr 28, 2022
[0]PETSC ERROR: bench.pt on a linux-gnu-fluid-opt named ###
[0]PETSC ERROR: Configure options --with-petsc-arch=linux-gnu-fluid-opt --with-debugging=no --with-errorchecking=yes --CXXOPTFLAGS=-O2 --COPTFLAGS=-O2 --download-mpich=yes --download-cmake=yes --FOPTFLAGS=-O2 --download-fblaslapack=1 --download-mumps=1 --download-scalapack=1 --download-openblas=1 --download-superlu_dist=1 --download-superlu=1 --with-cxx-dialect=C++11 --download-hypre=1 --download-sundials2=1 --download-metis=1 --download-parmetis=1 --with-shared-libraries=yes PETSC_ARCH=linux-gnu-fluid-opt
[0]PETSC ERROR: #1 User provided function() at unknown file:0
[0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash.
application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=59
:
system msg for write_line failure : Bad file descriptor

-----------------------------------------------------------

We found that it is possible in theory to have more than 3 columns of output (in AlievPanfilov: time, Vm, Iion), because another model, AslanidiSleiman, which has 3 nodal() lines and 4 output columns (time, Vm, Ke, Iion).

Can you please direct the path to how it can be solved? Can the AlievPanfilov.model file be modified so that it will output 4 columns?

Thank you in advance!

1 Answer

0 votes
by (3.6k points)

Hi Alexander,

If you want to add a new variable in the output file you can use .trace(). You can find an explanation in EasyML markup

For example, if you want to trace the U variable you can add U.trace(); or U=(Vm-vm_rest)/vm_norm;.trace()

Cheers,

Jorge

by (120 points)
Hi Jorge,

Thank you, it works, but only for bench.

When we tried to use 'trace' for carp.pt, the problem wasn't solved. I will try to find the solution for it, and possibly ask a more detailed question again, but in general - is it possible to use 'V; .external(V); .nodal();' to extract values rather than 'trace' structure?

Regards, Alexander.
by (3.6k points)
Hi Alexander,

I think what you are looking for is the parameter trace in openCARP. You can check in our online parameter (https://opencarp.org/documentation/opencarp-parameters#master) for trace. With trace you can output the variables of the nodes of your mesh.

Cheers,

Jorge
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...