sibernetic icon indicating copy to clipboard operation
sibernetic copied to clipboard

Enhance configuration files with physical parameters specific to full/half resolution worm

Open pgleeson opened this issue 7 years ago • 3 comments

Currently there are a number of physical properties within the Sibernetic code which are tuned for the full or half resolution (development branch is set for half resolution...) versions of the model.

It would be better if these could be set when loading in the configuration files (e.g. full res, half res).

It would be great also if this file could contain comments on what the values were, e.g.

1.0 # viscosity
2.0 # mass per body particle

pgleeson avatar Oct 19 '17 14:10 pgleeson

Doing this will not be a piece of cake because of the following: At present most of physical parameters are constants, and adding possibility of initialization of their values from the configuration file will require noticeable changes in the source code. Simply changing constants to non-constants causes an avalanche of errors. It will be necessary to move all of them from owPhysicsConstants.h into owConfigProperty class. Also, changing some of physical parameters influence the amount of memory which should be allocated for simulation box, and this also should be taken into account. Estimated time for doing this - the middle of the next week, taking into account another issues.

a-palyanov avatar Oct 20 '17 11:10 a-palyanov

Also I suppose that it will be nice to add to this config the possibility to define colors of the main elements of the scene - background, liquid, elastic matter, worm body, elastic matter particles which contacted worm body (which show worm's trace on agar), maybe something else.

a-palyanov avatar Oct 21 '17 06:10 a-palyanov

Current version of worm_alone_half_resolution scene configuration file starts with the following data block:

0
100.2
0
50.1
0
267.2
[position]
51.1166	5.21027	13.3002	2.105
49.0494	5.20471	13.307	2.105
50.0918	6.23142	13.3	2.105
.....

To include (bio)physical parameters into the same file with scene configuration (to avoid situations of running a scene with one resolution and physical parameters - from another), we need to define some format of data block containing these parameters. I suppose to insert it into the very beginning of the scene configuration file (something like this):

[physical parameters]
5.0e-06 //[s] - integration time step of the pci sph algorithm
7.83e-13 //[m] - mass of every particle within the simulation
1000.0 //[kg/m^3] - density of liquid (water) within the simulation
.... and all the rest parameters which are currently defined in the owPhysicConstant.h
[simulation box dimensions]
0
100.2
0
50.1
0
267.2
[position]
51.1166	5.21027	13.3002	2.105
49.0494	5.20471	13.307	2.105
50.0918	6.23142	13.3	2.105
50.0968	4.1832	13.2731	2.105
50.0775	5.2271	11.7124	2.105
51.4411	5.20933	13.3417	2.105
.......

a-palyanov avatar Oct 23 '17 06:10 a-palyanov