Dear all,
My aim is to build a canopy photosysnthesis model for a heterogeneous multi-species vegetation on a spatial grid of 4.5 m x 4.5 m. I defined a 3-d grid using the advices for row and column definition. The boundaries of the scene shall not give rise to edge effects. Hence, I have to apply what is called a periodic boundary condition.
I see several possibilities for accomplishing this:
1. Setting the properties of the last grid element in each direction to the values of the first grid element (making a copy of first grid in last grid).
or
2. Defining an association between neighbouring grids (Moore or von Neumann neighbourhood in 3-d) including the special case of neighbourhood first-last grid.
Does anybody have some experience with implementation of periodic boundary conditions in Simile and could give me some advice whether one of the two ideas has some advantages over the other or if additional methods exist?
Any assistance will be greatly appreciated, Uwe
:idea: Implementation of periodic/reflective boundary conditions could also be a topic for the Tips and Tricks section on the SIMILE webpage.
Periodic boundary conditions on a spatial grid
The second option is the one to go for -- Simile allows the conditions for a neighbour relationship to be explicitly defined, so it is easy to set those conditions to include the special case of last/first.
--Jasper
Periodic boundary conditions on a spatial grid
Dear Jasper,
thanks for pointing me into that direction.
To close this topic I would like to document how I atempt to tackle the problem:
- I did set up the scene by defining its dimension (Length in x = L_x, Length in y = L_y, Maximum Height of individual plants in z = Max_Height) and the number of instances for the cubes (= int(L_x * L_y * Max_Height/ dL^3))using Creation in a population submodel.
- x and z coordinates were set as rows in the usual way and y coordinates were set as columns, respectively.
- Cube neighbourhood and boundary conditions are defined in a submodel (connected to the first using two role arrows: me and my Neighbour) by writing the condition code as:
not (X_my_Neighbour == X_me and Y_my_Neighbour==Y_me
and Z_my_Neighbour == Z_me)
and
((abs(X_my_Neighbour-X_me) or abs(X_my_Neighbour - X_me) > L_x/dL - 1.5 * dL) ; and (abs(Y_my_Neighbour-Y_me) or abs(Y_my_Neighbour - Y_me) > L_y/dL - 1.5 * dL) ; and abs(Z_my_Neighbour-Z_me)
I hope this will work, Uwe