FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
CRootBox/python/example2b.py at master · Plant-Root-Soil-Interactions-Modelling/CRootBox · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Plant-Root-Soil-Interactions-Modelling
/
CRootBox
Public
Notifications
You must be signed in to change notification settings
Fork
12
Star
20
Code
Issues
3
Pull requests
3
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
CRootBox
/
python
/
example2b.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (27 loc) · 920 Bytes
Breadcrumbs
CRootBox
/
python
/
example2b.py
Copy path
File metadata and controls
33 lines (27 loc) · 920 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""multiple root systems"""
import
py_rootbox
as
rb
name
=
"Zea_mays_4_Leitner_2014"
simtime
=
120
N
=
3
# number of columns and rows
dist
=
40
# distance between the root systems [cm]
# Initializes N*N root systems
allRS
=
[]
for
i
in
range
(
0
,
N
):
for
j
in
range
(
0
,
N
):
rs
=
rb
.
RootSystem
()
rs
.
readParameters
(
"modelparameter/"
+
name
+
".xml"
)
rs
.
getRootSystemParameter
().
seedPos
=
rb
.
Vector3d
(
dist
*
i
,
dist
*
j
,
-
3.
)
# cm
rs
.
initialize
()
allRS
.
append
(
rs
)
# Simulate
for
rs
in
allRS
:
rs
.
simulate
(
simtime
,
True
)
# Export results as single vtp files (as polylines)
ana
=
rb
.
SegmentAnalyser
()
# see example 3b
for
i
,
rs
in
enumerate
(
allRS
):
vtpname
=
"../results/example_2b_"
+
str
(
i
)
+
".vtp"
rs
.
write
(
vtpname
)
ana
.
addSegments
(
rs
)
# collect all
# Write all into single file (segments)
ana
.
write
(
"../results/example_2b_all.vtp"
)
print
(
"done."
)
Back
|
FazBrowse Home
|
New Git URL