Skip to content

Commit 0962d15

Browse files
committed
Update repository documentation and other details
1 parent 3bf6766 commit 0962d15

151 files changed

Lines changed: 254 additions & 1804 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
resources/** linguist-vendored
1+
*.html linguist-vendored

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
3333
- name: Extract test files
3434
run: |
35-
cd virtualbow/rust/virtualbow/data
35+
cd virtualbow/solver/virtualbow/data
3636
7z x examples.zip -p${{ secrets.UNZIP_PASSWORD }}
3737
3838
- name: Build and test solver
3939
run: |
40-
cd virtualbow/rust
40+
cd virtualbow/solver
4141
cargo clippy --all-targets
4242
cargo build --release
4343
cargo test --release
@@ -80,12 +80,12 @@ jobs:
8080
8181
- name: Extract test files
8282
run: |
83-
cd virtualbow/rust/virtualbow/data
83+
cd virtualbow/solver/virtualbow/data
8484
7z x examples.zip -p${{ secrets.UNZIP_PASSWORD }}
8585
8686
- name: Build and test solver
8787
run: |
88-
cd virtualbow/rust
88+
cd virtualbow/solver
8989
cargo clippy --all-targets
9090
cargo build --release
9191
cargo test --release
@@ -129,12 +129,12 @@ jobs:
129129
130130
- name: Extract test files
131131
run: |
132-
cd virtualbow/rust/virtualbow/data
132+
cd virtualbow/solver/virtualbow/data
133133
7z x examples.zip -p${{ secrets.UNZIP_PASSWORD }}
134134
135135
- name: Build and test solver
136136
run: |
137-
cd virtualbow/rust
137+
cd virtualbow/solver
138138
cargo clippy --all-targets
139139
cargo build --release
140140
cargo test --release

.github/workflows/coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020

2121
- name: Extract test files
2222
run: |
23-
cd rust/virtualbow/data
23+
cd solver/virtualbow/data
2424
7z x examples.zip -p${{ secrets.UNZIP_PASSWORD }}
2525
2626
- name: Generate code coverage for solver tests
2727
run: |
28-
cd rust/virtualbow
28+
cd solver/virtualbow
2929
rustup default nightly
3030
cargo llvm-cov --release --branch --no-report
3131
cargo llvm-cov report --release --html --output-dir "."
@@ -44,7 +44,7 @@ jobs:
4444
echo "This is an automatic summary of the test coverage results for the latest commit on this pull request." >> summary.md
4545
echo "The full report can be downloaded [here](${{ steps.artifact-upload-step.outputs.artifact-url }})." >> summary.md
4646
echo '```' >> summary.md
47-
echo "$(<rust/virtualbow/text/index.txt)" >> summary.md
47+
echo "$(<solver/virtualbow/text/index.txt)" >> summary.md
4848
echo '```' >> summary.md
4949
5050
- name: Add summary as a pull request comment

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,42 @@
33
![Build Status](https://github.com/bow-simulation/virtualbow/actions/workflows/build.yml/badge.svg)
44

55
VirtualBow is a software tool for designing and simulating bows.
6-
Visit http://www.virtualbow.org for more information about the project.
6+
It consists of an editor and a result viewer written in C++/Qt and a custom finite element solver written in Rust.
7+
For more information about the project visit http://www.virtualbow.org.
8+
9+
<img src="docs/user-manual/source/images/screenshots/editor/model-editor.png" width="600px">
710

811
# Building
912

1013
## Solver
1114

12-
The solver is the part that does the numerical computations and is written in Rust.
13-
Building the solver therefore requires a Rust compiler and the Cargo build tool.
14-
Building the solver executable is as easy as running `cargo build --release`, which automatically downloads and compiles the required dependencies as well.
15-
To run the tests, use `cargo test --release` (the release flag helps with performance since the simulation is very slow in debug mode).
15+
The solver is the part that does the numerical computations.
16+
It is located unter [solver/](solver/).
17+
18+
Building the solver requires a Rust compiler and the Cargo build tool and should be as easy as running `cargo build --release`, which automatically downloads and compiles the required dependencies as well.
19+
20+
To run the tests, use `cargo test --release`.
21+
The release flag helps with performance since the simulation is very slow in debug mode.
22+
Some of the tests are capable of producing plots using the [`plotters`](https://github.com/plotters-rs/plotters) crate.
23+
This can be enabled with the `plotters` feature flag, for example by running the tests as `cargo test --release --features "plotters"`.
24+
The resulting plots can be found in the `target` directory.
25+
On Linux this feature requires some additional dependencies [as documented in the plotters readme](https://github.com/plotters-rs/plotters#dependencies).
26+
1627

1728
## GUI
1829

19-
The VirtualBow GUI application built around the solver is written in C++.
20-
Building it requires, in addition to the solver requirements, CMake, a C++17 compiler and the following external dependencies:
30+
The GUI application, consisting of a model editor and a result viewer, is located under [gui/](gui/).
31+
32+
Building it requires, in addition to the solver's requirements, CMake, a C++17 compiler and the following external dependencies:
2133

22-
* [Qt 5.9.5](https://www.qt.io/)
34+
* [Qt 6.2.4](https://www.qt.io/)
2335
* [Boost 1.79.0](https://www.boost.org/)
36+
* [Catch 2.13.9](https://www.boost.org/)
2437
* [Eigen 3.4.0](http://eigen.tuxfamily.org/)
2538
* [Json 3.10.5](https://github.com/nlohmann/json)
2639

27-
Also used are [QCustomPlot](https://www.qcustomplot.com/) and [Calculate](https://github.com/newlawrence/Calculate), but those are already included with this repository.
28-
The version numbers are just the minimum needed, newer versions might work too.
40+
Also used are [QCustomPlot](https://www.qcustomplot.com/) and [Calculate](https://github.com/newlawrence/Calculate), but those are already included in the repository.
41+
The version numbers are just the ones currently used, other/newer versions might work too.
2942

3043
Optional pre-built dependencies for the supported platforms and compilers are available at [virtualbow-dependencies](https://github.com/bow-simulation/virtualbow-dependencies/releases).
3144
They each contain a file named `paths.cmake` that will set up the `CMAKE_PREFIX_PATH` so that the libraries are found by CMake.
@@ -66,7 +79,7 @@ The rest of the build process is the same on Linux and MacOS
6679

6780
Contributions of any kind are very welcome!
6881

69-
The development of VirtualBow is discussed and planned publicly on our [issue tracker](https://github.com/bow-simulation/virtualbow/issues) and the [discussions](https://github.com/bow-simulation/virtualbow/discussions).
82+
The development of VirtualBow is discussed and planned on our [issue tracker](https://github.com/bow-simulation/virtualbow/issues) and the [discussions](https://github.com/bow-simulation/virtualbow/discussions).
7083
Feel free to participate by either commenting on existing topics or opening your own ones for feedback, new ideas, feature requests or bug reports.
7184
If you plan a larger contribution, consider discussing it with us first to make sure that it fits the scope and vision of the project.
7285

docs/examples/bows/longbow.bow

Lines changed: 83 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,92 @@
11
{
2-
"version": "0.10.0",
3-
"comment": "",
4-
"settings": {
5-
"num_limb_elements": 40,
6-
"num_limb_eval_points": 250,
7-
"min_draw_resolution": 150,
8-
"max_draw_resolution": 150,
9-
"static_iteration_tolerance": 1e-6,
10-
"arrow_clamp_force": 0.0,
11-
"string_compression_factor": 1e-6,
12-
"timespan_factor": 1.5,
13-
"timeout_factor": 10.0,
14-
"min_timestep": 1e-6,
15-
"max_timestep": 0.0001,
16-
"steps_per_period": 250,
17-
"dynamic_iteration_tolerance": 1e-6
18-
},
19-
"handle": {
20-
"type": "rigid",
21-
"value": {
22-
"length": 0.0,
23-
"angle": 0.0,
24-
"pivot": 0.0
25-
}
26-
},
27-
"draw": {
28-
"brace_height": 0.11825,
29-
"draw_length": {
30-
"type": "standard",
31-
"value": 0.66825
32-
}
33-
},
34-
"profile": {
35-
"segments": [
36-
{
37-
"type": "line",
38-
"parameters": {
39-
"length": 0.87
40-
}
41-
}
42-
]
43-
},
44-
"section": {
45-
"alignment": {
46-
"type": "section_back"
2+
"comment": "",
3+
"damping": {
4+
"damping_ratio_limbs": 0.0,
5+
"damping_ratio_string": 0.0
476
},
48-
"width": [
49-
[
50-
0.0,
51-
0.028575
52-
],
53-
[
54-
0.258,
55-
0.028575
56-
],
57-
[
58-
0.516,
59-
0.03175
60-
],
61-
[
62-
1.0,
63-
0.015875
64-
]
7+
"dimensions": {
8+
"brace_height": 0.15,
9+
"draw_length": 0.7,
10+
"handle_angle": 0.0,
11+
"handle_length": 0.0,
12+
"handle_setback": 0.0
13+
},
14+
"layers": [
15+
{
16+
"E": 15000000000.0,
17+
"height": [
18+
[
19+
0.0,
20+
0.03175
21+
],
22+
[
23+
0.05,
24+
0.03
25+
],
26+
[
27+
0.058,
28+
0.025
29+
],
30+
[
31+
0.08,
32+
0.02
33+
],
34+
[
35+
1.0,
36+
0.0127
37+
]
38+
],
39+
"name": "unnamed",
40+
"rho": 600.0
41+
}
6542
],
66-
"materials": [
67-
{
68-
"name": "unnamed",
69-
"color": "#b88e65",
70-
"density": 600.0,
71-
"youngs_modulus": 15000000000.0,
72-
"shear_modulus": 6000000000.0,
73-
"tensile_strength": 0.0,
74-
"compressive_strength": 0.0,
75-
"safety_margin": 0.0
76-
}
43+
"masses": {
44+
"arrow": 0.08,
45+
"limb_tip": 0.005,
46+
"string_center": 0.005,
47+
"string_tip": 0.005
48+
},
49+
"profile": [
50+
[
51+
0.0,
52+
0.0
53+
],
54+
[
55+
0.87,
56+
0.0
57+
]
7758
],
78-
"layers": [
79-
{
80-
"name": "unnamed",
81-
"material": "unnamed",
82-
"height": [
83-
[
59+
"settings": {
60+
"arrow_clamp_force": 0.0,
61+
"n_draw_steps": 150,
62+
"n_limb_elements": 40,
63+
"n_string_elements": 45,
64+
"sampling_rate": 10000.0,
65+
"time_span_factor": 1.5,
66+
"time_step_factor": 0.5
67+
},
68+
"string": {
69+
"n_strands": 12,
70+
"strand_density": 0.0005,
71+
"strand_stiffness": 3500.0
72+
},
73+
"version": "0.8",
74+
"width": [
75+
[
8476
0.0,
77+
0.028575
78+
],
79+
[
80+
0.258,
81+
0.028575
82+
],
83+
[
84+
0.516,
8585
0.03175
86-
],
87-
[
88-
0.05,
89-
0.03
90-
],
91-
[
92-
0.058,
93-
0.025
94-
],
95-
[
96-
0.08,
97-
0.02
98-
],
99-
[
86+
],
87+
[
10088
1.0,
101-
0.0127
102-
]
89+
0.015875
10390
]
104-
}
10591
]
106-
},
107-
"string": {
108-
"strand_stiffness": 3500.0,
109-
"strand_density": 0.0005,
110-
"n_strands": 12
111-
},
112-
"masses": {
113-
"arrow": {
114-
"type": "mass",
115-
"value": 0.08
116-
},
117-
"limb_tip": 0.005,
118-
"string_center": 0.005,
119-
"string_tip": 0.005
120-
},
121-
"damping": {
122-
"damping_ratio_limbs": 0.0,
123-
"damping_ratio_string": 0.0
124-
}
125-
}
92+
}

0 commit comments

Comments
 (0)