espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] An error on espressomd


From: Ivan Cimrak
Subject: Re: [ESPResSo-users] An error on espressomd
Date: Mon, 1 Apr 2019 08:22:21 +0200

Dear Chrissie,

My previous reply was not sent to mailing-list so I am sending this again - and also extended (thanks Iveta).

There are two issues:
1. For the Object-in-fluid module you need to include a couple of additional features in myconfig.hpp. Attached, you can find an example of such file, you need to put this file in your build directory before running cmake.
2. Example script you are providing was taken from the book we published recently, I suppose (Computational Blood Cell Mechanics:
Road towards Models and Biomedical Applications, www.compbloodcell.eu). For this script, you need ESPResSo 4.0 installed. If you intend to use up-to-date version of the Object-in-fluid, you should use the sources from
https://github.com/icimrak/espresso/tree/python
For this however, the definition of fluid has changed, see attached script.

I hope this helps,

Ivan

Attachment: test.py
Description: Text Data

Attachment: myconfig.hpp
Description: Binary data




On 1 Apr 2019, at 05:11, 陈敏 <address@hidden> wrote:

After my compiling with default configuration(src/core/myconfig-default.hpp) on Ubuntu 18.04, I run a python script as follow:
——————————————————————————————————————————————————————
import espressomd
import object_in_fluid as oif
from espressomd import lb
import numpy as np

system = espressomd.System(box_l=[22.0, 14.0, 14.0])
system.time_step = 0.1
system.cell_system.skin = 0.2

# creating the template for RBCs
type = oif.OifCellType(nodes_file="input/rbc374nodes.dat", triangles_file="input/rbc374triangles.dat",
                        check_orientation=False, system=system, ks=0.02, kb=0.016, kal=0.02,
                        kag=0.9, kv=0.5, resize=[2.0, 2.0, 2.0])

# creating the RBCs
cell = oif.OifCell(cell_type=type, particle_type=0, origin=[5.0, 5.0, 3.0])
cell.output_vtk_pos_folded(file_name="output/sim1/cell_0.vtk")

# fluid
lbf = espressomd.lb.LBFluid(agrid=1, dens=1.0, visc=1.5, tau=system.time_step, fric=1.5, ext_force_density=[0.0002, 0.0, 0.0])
system.actors.add(lbf)

# main integration loop
maxCycle = 100
for i in range(1, maxCycle):
    system.integrator.run(steps=500)
    cell.output_vtk_pos_folded(file_name="output/sim1/cell_" + str(i) + ".vtk")
    print "time: ", str(i*system.time_step*500)
print "Simulation completed.»
——————————————————————————————————————————————————————
En error is follow:
<PastedGraphic-1.png>

The used files are in the appendix

Could anyone help me out?
Many thanks
Chrissie

<rbc374triangles.dat>
<rbc374nodes.dat>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]