I really appreciate the quick response. This is my code.
def run(args, job):
# Path to your mesh file
meshname = "/home/diya/Documents/openCARP/external/experiments/tutorials/02_EP_tissue/00_simple/atrial"
# Load the mesh
#geom = mesh.load(meshname)
# Get basic command line, including solver options from external .par file
cmd = tools.carp_cmd(tools.simfile_path(os.path.join(EXAMPLE_DIR, 'simple.par')))
# Attach electrophysiology physics (monodomain) to mesh region with tag 1
cmd += tools.gen_physics_opts(IntraTags=[1])
cmd += ['-simID', job.ID,
'-meshname', meshname,
'-tend', args.tend]
# Set monodomain conductivities
cmd += ['-num_gregions', 1,
'-gregion[0].name', "myocardium",
'-gregion[0].num_IDs', 1,
'-gregion[0].ID', "1",
'-gregion[0].g_el', 0.625,
'-gregion[0].g_et', 0.236,
'-gregion[0].g_en', 0.236,
'-gregion[0].g_il', 0.174,
'-gregion[0].g_it', 0.019,
'-gregion[0].g_in', 0.019,
'-gregion[0].g_mult', 0.5]
# Define the ionic model to use
cmd += ['num_imp_regions', 1,
'imp_region[0].im', 'Courtemanche',
'imp_region[0].num_IDs',1,
'imp_region[0].ID[0]', 1]
# Define the geometry of the stimulus directly in the command line
# Replace with your specific stimulus location and parameters
cmd += ['-stimulus', 'x', '0', '100', '0', '1']
if args.visualize:
cmd += ['-gridout_i', 3] # output both surface & volumetric mesh for visualization
# Run simulation
job.carp(cmd)
# Do visualization
if args.visualize and not settings.platform.BATCH:
geom = os.path.join(job.ID, os.path.basename(meshname)+'_i')
data = os.path.join(job.ID, 'vm.igb.gz')
view = tools.simfile_path(os.path.join(EXAMPLE_DIR, 'simple.mshz'))
job.meshalyzer(geom, data, view)
I have converted my vtk file into .elem,.pts,.lon files. But it wont open on my meshalyzer. Could you please help me out?
This is the error I'm getting -
*** Unrecognized keyword stim[0].num_IDs
*** Error reading parameters
Error: 2024-07-01_simple_100.0_petsc_np1/vm.igb.gz does not exist!
#-------------------------------------------------------------------------------
# Launching Meshalyzer
#-------------------------------------------------------------------------------
/usr/local/bin/meshalyzer/meshalyzer \
2024-07-01_simple_100.0_petsc_np1/atrial_i \
2024-07-01_simple_100.0_petsc_np1/vm.igb.gz \
/home/diya/Documents/openCARP/external/experiments/tutorials/02_EP_tissue/00_simple/./simple.mshz
Error: could not open /home/diya/Documents/openCARP/external/experiments/tutorials/02_EP_tissue/00_simple/atrial.elem.pts for reading! Reason:
No such file or directory
Unable to read proper points file
/usr/local/bin/meshalyzer/meshalyzer failed with error code 1