├── .dockerignore
├── .gitignore
├── COPYING
├── Dockerfile
├── LICENSE
├── README.md
├── TODO.md
├── auths
├── htpasswd
│ ├── .htaccess
│ ├── .htpasswd
│ ├── README.md
│ └── auth.php
└── single-user
│ └── auth.php
├── bin
└── .gitignore
├── cadimporters
└── upload
│ ├── gmshcheck.py
│ └── import_cad.php
├── cadprocessors
└── gmsh
│ ├── cad2stl.py
│ ├── cadcheck.py
│ ├── cadimport.py
│ ├── initial_mesh.sh
│ └── process.php
├── conf.php
├── data
└── .gitignore
├── deps.sh
├── doc
├── FAQs.md
├── INSTALL.md
├── README.md
├── licenses.md
├── licensing.md
├── logo.svg
├── tutorials.md
├── virtual.md
└── workflow.md
├── html
├── .htaccess
├── ajax2mesh.php
├── ajax2problem.php
├── ajax2yaml.php
├── assets
│ └── named_cube.x3d
├── cad.php
├── case.php
├── change_step.php
├── common.php
├── css
│ └── faster-than-quick
├── expert.php
├── img
│ └── logo.svg
├── index.php
├── js
│ ├── faster-than-quick
│ └── index.html
├── mesh.php
├── mesh_data.php
├── mesh_graph.php
├── mesh_inp_save.php
├── mesh_inp_show.php
├── mesh_log.php
├── mesh_msh.php
├── meshing.php
├── meshing_cancel.php
├── meshing_relaunch.php
├── meshing_status.php
├── new
│ ├── create.php
│ ├── img
│ │ └── logo.svg
│ ├── import_cad.php
│ ├── index.php
│ ├── preview.php
│ ├── problems.php
│ ├── process.php
│ └── sample.step
├── problem.php
├── problem_fee.php
├── problem_fee_save.php
├── properties.php
├── results.php
├── results_data.php
├── results_vtk.php
├── solving.php
├── solving_relaunch.php
└── solving_status.php
├── meshers
├── README.md
└── gmsh
│ ├── .gitignore
│ ├── LICENSE
│ ├── ajax2mesh.php
│ ├── cadmesh.py
│ ├── default0.geo
│ ├── default1.geo
│ ├── default2.geo
│ ├── default3.geo
│ ├── default4.geo
│ ├── default5.geo
│ ├── deps.sh
│ ├── mesh.sh
│ ├── mesh_data.php
│ ├── mesh_data.py
│ ├── mesh_graph.php
│ ├── mesh_inp_save.php
│ ├── mesh_inp_show.php
│ ├── mesh_log.php
│ ├── mesh_meta.py
│ ├── mesh_status.sh
│ ├── meshing_cancel.php
│ ├── meshing_relaunch.php
│ ├── meshing_status.php
│ ├── process_step.php
│ ├── quality.gp
│ ├── quality.py
│ └── trymesh.py
├── renderers
└── x3dom
│ ├── .gitignore
│ ├── LICENSE
│ └── deps.sh
├── solvers
├── README.md
├── ccx
│ ├── LICENSE
│ ├── ajax2problem.php
│ ├── change_step_solve.php
│ ├── common.php
│ ├── deps.sh
│ ├── frd2vtk.fee
│ ├── input_initial_mechanical.php
│ ├── problem_fee.php
│ ├── problem_fee_save.php
│ ├── problems.php
│ ├── results_data.php
│ ├── solve.sh
│ ├── solve_status.sh
│ └── solving_status.php
├── common.php
├── feenox
│ ├── LICENSE
│ ├── ajax2problem.php
│ ├── change_step_solve.php
│ ├── common.php
│ ├── deps.sh
│ ├── displacements.fee
│ ├── feenox.xml
│ ├── field.fee
│ ├── field1.fee
│ ├── input_initial_heat_conduction.php
│ ├── input_initial_mechanical.php
│ ├── problem_fee.php
│ ├── problem_fee_save.php
│ ├── problems.php
│ ├── results_data.php
│ ├── results_data
│ │ ├── heat_conduction.php
│ │ └── mechanical.php
│ ├── second2first.fee
│ ├── solve.sh
│ ├── solve_status.sh
│ ├── solving_relaunch.php
│ └── solving_status.php
├── problems.php
└── sparselizard
│ ├── LICENSE
│ └── problems.php
└── uxs
├── .gitignore
└── faster-than-quick
├── about.php
├── bootswatch
├── .gitignore
├── _bootswatch.scss
├── _variables.scss
└── make.sh
├── cad.php
├── change_step.php
├── css
├── .gitignore
├── bootstrap.min.css
├── ftq.css
├── highlight.css
└── index.html
├── deps.sh
├── expert.php
├── importers
└── upload.php
├── index.php
├── js
├── .gitignore
├── ftq.js
├── heat_conduction.js
├── index.html
└── mechanical.js
├── labels.php
├── labels
├── .gitignore
├── README.md
├── labels.awk
├── labels.sh
└── labels.txt
├── mesh.php
├── mesh
└── gmsh.php
├── meshing.php
├── named_cube.x3d
├── new.php
├── preview.php
├── problem.php
├── problem
├── heat_conduction.php
└── mechanical.php
├── properties.php
├── results.php
├── results
├── heat_conduction.php
└── mechanical.php
├── share.php
├── small_axes.html
├── solving.php
└── ux.php
/.dockerignore:
--------------------------------------------------------------------------------
1 | __pycache__
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | deps
2 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:8.2.20-apache AS final
2 | RUN apt-get update && apt-get install -y \
3 | python3 \
4 | && rm -rf /var/lib/apt/lists/* \
5 | RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
6 | COPY . /var/www
7 | RUN mkdir -p /var/www/data && chown www-data:www-data /var/www
8 | USER www-data
9 |
10 | # docker build -t suncae:2024-9-14 .
11 | # docker run -p 9000:80 suncae:2024-9-14
12 | # docker ps
13 | # docker exec -it bash
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Anything that does not have either notice a LICENSE in the directory is AGPLv3+.
2 | See the file COPYING for details.
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SunCAE: Simulations in your browser
2 |
3 | 
4 |
5 | > A free and open source web-based platform for performing CAE in the cloud.
6 |
7 | ## What
8 |
9 | SunCAE is a web-based front end and a cloud-based back end to perform finite-element calculations directly on the browser.
10 |
11 | * The front end is an HTML client with plain vanilla javascript code (i.e. no Angular, no React, not even jQuery) that provide interactivity by sending JSON-based AJAX request to the server backe end.
12 | * The back end is written in PHP and responds to the client requests by creating the necesary files, executing the necesary binaries and returning back 3D data to the client.
13 |
14 | Both fron end and back ends are free software, released under the terms of the [AGPLv3](https://www.gnu.org/licenses/agpl-3.0.en.html). See [licensing](#licensing) below for more information.
15 |
16 |
17 | ## Why
18 |
19 | 1. **No need to install.** You can use it [online](https://www.caeplex.com/suncae) because it is web-based.
20 | 2. **Single source of truth.** All your data is in a single location because it is cloud-first.
21 | 3. **Increased traceability.** All changes are tracked using Git.
22 | 4. **Collaboration.** Many users can access the same case. And Git keeps track of who changed what when.
23 | 5. **Mobile-friendly.** Access your simulation project from your phone or tablet.
24 | 6. **Free and open source.** As in "free speech." You fully get the four freedoms.
25 | 7. **Extensible.** Add more meshers, solvers, UXs, etc. Join the community!
26 |
27 |
28 | ## How
29 |
30 | You can use SunCAE either by...
31 |
32 | 1. using someone else’s servers and configurations
33 |
34 | * open [this link to use SunCAE in our live demo](https://www.caeplex.com/suncae)
35 | * check out these Youtube videos to learn how to use it
36 | - [Tutorial #1: Overview](https://youtu.be/MYl7-tcCAfE) (4 min)
37 | - [Tutorial #2: NAFEMS LE10](https://youtu.be/ANQX0EZI_q8) (4 min)
38 | - [Tutorial #3: Heat conduction](https://youtu.be/WeEeZ5BVm8I) (3.5 min)
39 |
40 |
41 | 2. hosting your own server (it can be your laptop!) so you (or other people) can use it:
42 |
43 | 1. install some common dependencies
44 | 2. clone the SunCAE repository
45 | 3. run a script to fetch the open source CAE-related tools (renderers, solvers, meshers, etc.):
46 |
47 | ```terminal
48 | sudo apt-get install git
49 | git clone https://github.com/seamplex/suncae
50 | cd suncae
51 | sudo apt-get install unzip patchelf wget php-cli php-yaml gnuplot
52 | ./deps.sh
53 | php -S localhost:8000 -t html
54 | ```
55 | 4. open with a web browser
56 |
57 | > [!NOTE]
58 | > SunCAE is aimed at the cloud. The cloud likes Unix (and Unix likes the cloud).
59 | > So these instructions apply to Unix-like servers, in particular GNU/Linux.
60 | > There might be ways to run SunCAE on Windows, but we need time to figure out what they are.
61 | >
62 | > Moreover, most CAE solvers do not perform in Windows.
63 | > There is a simple explanation: (good) solvers are written by hackers.
64 | > And hackers---as [Paul Graham already explained more than twenty years ago](https://paulgraham.com/gh.html)---do not like Windows (and Windows do not like hackers either).
65 |
66 |
67 | For more detailed instructions including setting up production web servers and using virtualization tools (e.g. docker and/or virtual machines) read the [installation guide](doc/INSTALL.md).
68 |
69 |
70 | ### Configuration
71 |
72 | With SunCAE---as with sundae ice creams---you get to choose the toppings:
73 |
74 | 1. [Authenticators](auths)
75 | * [single-user](auths/single-user)
76 | * [htpasswd](auths/htpasswd)
77 | * ...
78 | 2. [UXs](uxs)
79 | * [faster-than-quick](uxs/faster-than-quick)
80 | * ...
81 | 3. [CAD importers](cadimporters)
82 | * [upload](cadimporters/upload)
83 | * ...
84 | 4. [CAD processors](cadprocessors)
85 | * [gmsh](cadprocessors/gmsh)
86 | * ...
87 | 5. Runners (to be done, e.g. local, ssh, aws, ...)
88 | 6. Post processors (to be done, e.g. paraview, glvis, ...)
89 |
90 | Moreover, for each case users can choose the combination of
91 |
92 | * [Meshers](meshers) (e.g. [gmsh](meshers/gmsh, ...)
93 | * [Solvers](solvers) (e.g. [feenox](solvers/feenox), [calculix](solvers/calculix), ...)
94 |
95 |
96 | ## Licensing
97 |
98 | The content of this SunCAE repository is licensed under the terms of the [GNU Affero General Public License version 3](https://www.gnu.org/licenses/agpl-3.0.en.html), or at your option, any later version (AGPLv3+).
99 |
100 | This means that you get the four essential freedoms, so you can
101 |
102 | 0. Run SunCAE as you seem fit (i.e. for any purpose).
103 | 1. Investigate the source code to see how SunCAE works and to change it (or to hire someone to change it four you) as you seem fit (i.e. to suit your needs)
104 | 2. Redistribute copies of the source code as you seem fit (i.e. to help your neighbor)
105 | 3. Publish your changes (or the ones that the people you hired made) to the public (i.e. to benefit the community).
106 |
107 | > [!IMPORTANT]
108 | > With great power comes great responsibility.
109 |
110 | If you use a _modified_ version of SunCAE in your web server, [section 13 of the AGPL license](https://www.gnu.org/licenses/agpl-3.0.en.html#section13) requires you to give a link where your users can get these four freedoms as well.
111 | That is to say, if you use a verbatim copy of SunCAE in your server, there is nothing for you to do (because the link is already provided).
112 | But if you exercise freedoms 1 & 3 above and _modify_ SunCAE to suit your needs---let's say you don't like the button "Add Boundary Condition" and you change it to "Add restrains and loads"---you do need to provide a link for people to download the modified source code.
113 |
114 | > [!TIP]
115 | > If this licensing scheme does not suit you, contact us to see how we can make it work.
116 |
117 | * If you have a solver released under a license which is compatible with the AGPL and you would like to add it to SunCAE, feel free to fork the repository (and create a pull request when you are done).
118 | * If you have a solver released under a license which is not compatible with the AGPL and you would like to add it to SunCAE, contact us.
119 |
120 |
--------------------------------------------------------------------------------
/TODO.md:
--------------------------------------------------------------------------------
1 | # Roadmap
2 |
3 | * more problems (non-linear mechanics, transient thermal, modal, cfd, etc.)
4 | * more meshers (netgen? tetgen? salome?)
5 | * more solvers (sparselizard? ccx? fenics?)
6 | * more runners (ssh, aws, kubernetes, etc.)
7 | * more documentation
8 |
9 | # TODOs
10 |
11 | ## General
12 |
13 | * unit tests
14 | * choose units (SI, etc.)
15 | * choose points for BCs (and eventually refinements)
16 | * name in the BC should reflect the content
17 | * dashboard with case list
18 | * real-time collaboration
19 | * detect changes in CAD
20 | * git history in the UX
21 | * show face id when hovering
22 | * screenshots
23 | * once a minute refresh the axes, faces, edges, etc. (take a snapshot?)
24 | * investigate defeature operation in OCC through Gmsh (would we need a separate UX?)
25 | * re-implement how to show SunCAE version in about (when running `deps.sh`)
26 | * check that everything is fine when running `deps.sh`:
27 | - that executables work
28 | - that permissions are fine
29 | - create a `txt` with versions with `git log -1` + `git status --porcelain`
30 | * ability to take notes in markdown
31 | * help ballons, markdown + pandoc
32 | * limit DOFs: in conf? somewhere in auth? like `limits.php`?
33 | * remove visibility, everything is public
34 |
35 |
36 | ## Gmsh
37 |
38 | * STL input
39 | * combos for algorithms
40 | * checkboxes for bool
41 | * local refinements
42 | * understand failures -> train AI to come up with a proper `.geo`
43 | * other meshers! (tetget? netgen?)
44 | * multi-solid: bonded, glued, contact
45 | * curved tetrahedra
46 | * hexahedra
47 |
48 | ## Problem
49 |
50 | * choose faces with ranges e.g 1-74
51 | * other problems: modal
52 | * other solvers: ccx, sparselizard
53 | * orthotropic elasticity
54 | * thermal expansion (isotropic and orthotropic)
55 | * modal feenox
56 | * mechanical sparselizard
57 | * transient/quasistatic (a slider for time?)
58 |
59 | ## Results
60 |
61 | * fields (the list of available fields should be read from the outpt vtk/msh)
62 | - heat flux? (more general, vector fields?)
63 | * the server should tell the client
64 | - which field it is returning (so the client can choose the pallete)
65 | - if it has a warped field or not
66 | * the range scale has to be below the warp slider
67 | * nan color (yellow)
68 | * compute the .dat in the PHP, not in Bash
69 | * probes: user picks location, server returns all field
70 | * reactions: choose which BCs to compute reaction at in the problem step with a checkboxes
71 | * warning for large deformations/stresses
72 |
73 | ## Outer loops
74 |
75 | * parametric
76 | * optimization
77 |
78 | ## Dashboard
79 |
80 | * list of cases
81 |
82 | ## Backlog
83 |
84 | * zoom over mouse
85 | * disable BCs (comment them out)
86 |
--------------------------------------------------------------------------------
/auths/htpasswd/.htaccess:
--------------------------------------------------------------------------------
1 | AuthType Basic
2 | AuthName "Restricted Content"
3 | AuthUserFile .htpasswd
4 | Require valid-user
5 |
--------------------------------------------------------------------------------
/auths/htpasswd/.htpasswd:
--------------------------------------------------------------------------------
1 | pepe:$apr1$vATa7bcq$EBEVaET9ke0EWE6zs4P4Q1
2 |
--------------------------------------------------------------------------------
/auths/htpasswd/README.md:
--------------------------------------------------------------------------------
1 | Explain how to setup httpasswd.
2 |
--------------------------------------------------------------------------------
/auths/htpasswd/auth.php:
--------------------------------------------------------------------------------
1 | &1", $output, $error_level);
21 |
22 | // TODO: keep output
23 | if ($error_level != 0) {
24 | $response["status"] = "error";
25 | $response["error"] = "Unknown yyy error {$error_level} when importing CAD.";
26 | for ($i = 0; $i < count($output); $i++) {
27 | $response["error"] .= $output[$i];
28 | }
29 | suncae_log("CAD {$cad_hash} process {$response["status"]} {$response["error"]}");
30 | return_back_json($response);
31 | }
32 | }
33 |
34 | // ------------------------------------------------------------
35 | if (file_exists("cad.json")) {
36 | $cad = json_decode(file_get_contents("cad.json"), true);
37 | $response["position"] = $cad["position"];
38 | $response["orientation"] = $cad["orientation"];
39 | $response["centerOfRotation"] = $cad["centerOfRotation"];
40 | $response["fieldOfView"] = $cad["fieldOfView"];
41 |
42 | } else {
43 | $response["status"] = "error";
44 | $response["error"] = "Cannot create CAD json.";
45 | suncae_log("CAd {$cad_hash} process {$response["status"]} {$response["error"]}");
46 | return_back_json($response);
47 | }
48 |
49 |
50 | // ------------------------------------------------------------
51 | // leave running the mesher in the background
52 | exec("../../../../cadprocessors/gmsh/initial_mesh.sh > cadmesh.log 2>&1 &");
53 |
54 | suncae_log("CAD {$cad_hash} process {$response["status"]} {$response["error"]}");
55 |
56 |
57 | return_back_json($response);
58 |
59 |
--------------------------------------------------------------------------------
/conf.php:
--------------------------------------------------------------------------------
1 | [!TIP]
4 | > If your question is not listed here, do not hesitate [contacting us](https://www.seamplex.com/suncae/#contact).
5 |
6 | ### What is the difference between SunCAE, FeenoX, Seamplex and CAEplex?
7 |
8 | * [SunCAE](https://www.seamplex.com/suncae) is an open-source web-based interface for performing CAE in the cloud.
9 | * [FeenoX](https://www.seamplex.com/feenox) is an open-source finite-element solver which used in SunCAE by default.
10 | * [Seamplex](https://www.seamplex.com) is the company that developed both SunCAE and FeenoX
11 | * [CAEplex](https://www.caeplex.com) is the first web-based interface developed by Seamplex. It is [100% integrated into Onshape](https://www.youtube.com/watch?v=ylXAUAsfb5E).
12 |
13 |
14 | ### Can I try SunCAE without having to install it?
15 |
16 | Yes, check out our [live demo](https://www.caeplex.com/suncae).
17 | Note that
18 |
19 | * There is no need to register, but your IP might get logged.
20 | * The data (including CAD files) might (or not) get lost. Do not put sensitive stuff in the demo.
21 |
22 | ### What are the licensing terms?
23 |
24 | See the [licensing terms](licensing.md).
25 |
26 | ### What are the supported meshers?
27 |
28 | So far, only [Gmsh](http://gmsh.info/) is supported.
29 |
30 | See the directory [`meshers`](https://github.com/seamplex/suncae/tree/main/meshers) for the current list.
31 |
32 | If you want other meshers to be supported, say so in the [forum](https://github.com/seamplex/suncae/discussions).
33 |
34 |
35 | ### What are the supported solvers?
36 |
37 | So far, only [FeenoX](http://www.seamplex.com/feenox) is supported.
38 |
39 | See the directory [`solvers`](https://github.com/seamplex/suncae/tree/main/solvers) for the current list.
40 |
41 | If you want other solvers to be supported, say so in the [forum](https://github.com/seamplex/suncae/discussions).
42 |
43 |
--------------------------------------------------------------------------------
/doc/INSTALL.md:
--------------------------------------------------------------------------------
1 | # Installing and setting up SunCAE
2 |
3 | > [!TIP]
4 | > If you just want to use SunCAE without installing it, you can do so with the [live demo](https://www.caeplex.com/suncae).
5 |
6 | > [!NOTE]
7 | > Mind the license of SunCAE itself and the license of all the related packages that SunCAE uses to make sure you are not infringing any license.
8 |
9 | This document explains how to set up [SunCAE](https://www.seamplex.com/suncae) so as to serve one or more clients.
10 | A basic installation can be done relatively simple, even without understanding the meaning of the commands.
11 | Keep in mind that a full-fledged installation being able to serve different users might need deep understanding of networking and operating systems details.
12 |
13 | ## Architectures
14 |
15 | The code is aimed at being run on Unix systems. Specifically, Debian GNU/Linux.
16 | There might be ways of making SunCAE run on other architectures.
17 | If you happen to know how, please help us by explaining how.
18 |
19 | ## Cloning the repository
20 |
21 | The first step would be to clone the SunCAE repository:
22 |
23 | ```
24 | git clone https://github.com/seamplex/suncae
25 | cd suncae
26 | ```
27 |
28 |
29 | ## Dependencies
30 |
31 | The repository only hosts particular code and files which are not already available somewhere else.
32 | The latter include
33 |
34 | * meshers and solvers executables (e.g. `gmsh` and `feenox`)
35 | * Javascript libraries (e.g. `x3dom.js`)
36 | * CSS and fonts (e.g. `bootstrap.css`)
37 |
38 |
39 | ### Common
40 |
41 | SunCAE needs some functionality which is provided by packages which are commonly available in the most common GNU/Linux distribution repositories. Ranging from the web server itself, script interpreters (e.g. PHP and Bash) and other standard Unix utilities, this line (or a similar one for a non-Debian distribution) should be enough:
42 |
43 | ```
44 | sudo apt-get install git unzip patchelf wget php-cli php-yaml gnuplot
45 | ```
46 |
47 | ### Particular
48 |
49 | The meshers, solvers and required libraries and fonts can be downloaded by executing the `deps.sh` script in SunCAE's root directory:
50 |
51 | ```
52 | ./deps.sh
53 | ```
54 |
55 | > [!IMPORTANT]
56 | > Run the script from SunCAE's root directory, i.e.
57 | >
58 | > ```
59 | > ./deps.sh
60 | > ```
61 | >
62 | > and **not** from the parent (or any other directory) like
63 | >
64 | > ```
65 | > suncae/dep.sh
66 | > ```
67 |
68 | > [!TIP]
69 | > The script will try to download and copy the dependencies inside SunCAE's directories (ignored by Git) only if they are not already copied. To force the download and copy (say if the version changed), you can either delete the dependencies or pass `--force` to `deps.sh`
70 | >
71 | > ```
72 | > ./deps.sh --force
73 | > ```
74 |
75 |
76 | ## The web server
77 |
78 | SunCAE can be hosted with any web server capable of executing PHP scripts.
79 | The main entry point is under directorty `html`.
80 |
81 | All the user information is stored as files under the directory `data`.
82 | That is to say, there is not **database** (either SQL or Mongo-like).
83 | Just plain (Git-tracked) files.
84 |
85 | > [!TIP]
86 | > Backups are as simple as `cp`ing (or `rsync`ing, `tar`ring, etc.) the directory `data` somewhere else.
87 |
88 |
89 |
90 | ### PHP's internal web server
91 |
92 | The `php-cli` package includes a simple web server which is enough to host SunCAE for single-user mode (and it is even handy for debugging purposes).
93 | Just run `php` with the `-S` option. Choose an available port and pass the `html` directory in the `-t` option (or go into the `html` directory and run `php -S` from there without `-t`):
94 |
95 | ```terminal
96 | php -S localhost:8000 -t html
97 | ```
98 |
99 | > [!IMPORTANT]
100 | > The first time that SunCAE needs to use the `data` directory, it will be created and owned by the user running the server, which in this case will be the user that ran `php`.
101 | > Mind ownerships and permissions if you then change from the internal web server to a professional one such as Apache.
102 |
103 | ### Apache
104 |
105 | Configure Apache to serve the `html` directory in SunCAE's repository.
106 | By default, Apache's root directory is `/var/www/html`.
107 |
108 | A quick hack is to make sure that SunCAE’s [`html`](html) directory is available to be served. For instance, in the default installation you could do
109 |
110 | ```terminal
111 | ln -s html /var/www/html/suncae
112 | ```
113 |
114 | and then SunCAE would be available at .
115 |
116 | > [!WARNING]
117 | > Mind Apache's policies about symbolic links. They are not straightforward, so symlinking SunCAE's `html` directory into Apache's `html` directory might now work out of the box.
118 |
119 |
120 | * If you do not have experience with Apache, you might want to delete the default `/var/www` tree and clone SunCAE there.
121 | * If you have experience with Apache, there is little more to add.
122 |
123 |
124 | > [!IMPORTANT]
125 | > The first time that SunCAE needs to use the `data` directory, it will be created and owned by the user running the server, which in this case by default is `www-data`.
126 | > Mind ownerships and permissions when accessing `data`.
127 |
128 | ### Other servers
129 |
130 | We do not know.
131 |
132 |
133 | ## Stack configuration
134 |
135 | The file [`conf.php`](../conf.php) in SunCAE's root directory controls the choices of the implementations of the different components for the current instance of SunCAE being served:
136 |
137 | ```php
138 | $auth = "single-user";
139 | $ux = "faster-than-quick";
140 | $cadimporter = "upload";
141 | $mesher = "gmsh";
142 | $post = "paraview";
143 | $runner = "local";
144 | $solver = "feenox";
145 | $mesher = "gmsh";
146 | ```
147 |
148 | This means that
149 |
150 | 1. the same server can change the implementations by changing the content of `conf.php` dynamically
151 | 2. different servers (or the same server with different entry points) can serve different implementations by serving different `html` directories whose parent's `conf.php` is different.
152 | 3. any other combination is also possible, e.g. an interactive HTML-based panel that modifies `conf.php` on demand or that clones a new instance of SunCAE in an arbitrary location (and configures Apache to serve it).
153 |
--------------------------------------------------------------------------------
/doc/README.md:
--------------------------------------------------------------------------------
1 | # SunCAE documentation
2 |
3 | * [Installation guide](INSTALL.md)
4 | * [Tutorials](tutorials.md)
5 | * [FAQs](FAQs.md)
6 | * [Licensing](licensing.md)
7 |
8 |
--------------------------------------------------------------------------------
/doc/licenses.md:
--------------------------------------------------------------------------------
1 | # Renderers
2 |
3 | MIT/GPLv3+
4 |
5 | # Meshers
6 |
7 | ## Gmsh
8 |
9 | GPLv2+
10 |
11 | # Solvers
12 |
13 | ## Feenox
14 |
15 | GPLv3+
16 |
17 | ## Sparselizard
18 |
19 | GPLv2+
20 |
21 | ## CalculiX
22 |
23 | GPLv2+
24 |
25 |
--------------------------------------------------------------------------------
/doc/licensing.md:
--------------------------------------------------------------------------------
1 | # Licensing
2 |
3 | [SunCAE](https://www.seamplex.com/suncae) is released under the terms of the [GNU Affero General Public License version 3](https://www.gnu.org/licenses/agpl-3.0.en.html), or at your option, any later version. This means that you get the four essential freedoms, so you can
4 |
5 | 0. **Run** SunCAE as you seem fit (i.e. for any purpose).
6 | 1. **Investigate** the source code to see how
7 | SunCAE works and to change it (or to hire someone to change it four
8 | you) as you seem fit (i.e. to suit your needs)
9 | 2. **Redistribute** copies of the source code as
10 | you seem fit (i.e. to help your neighbor)
11 | 3. **Publish** your changes (or the ones that
12 | the people you hired made) to the public (i.e. to benefit the
13 | community).
14 |
15 | If you use a *modified* version of SunCAE in your web server, [section 13 of the AGPL license](https://www.gnu.org/licenses/agpl-3.0.en.html#section13) requires you to give a link where your users can get these four freedoms as well. That is to say, if you use a verbatim copy of SunCAE in your server, there is nothing for you to do (because the link is already
16 | provided). But if you exercise freedoms 1 & 3 above and *modify* SunCAE to suit your needs---let\'s say you don\'t like the button \"Add Boundary Condition\" and you change it to \"Add restrains and loads\"---you do need to provide a link for
17 | people to download the modified source code.
18 |
19 | > [!NOTE]
20 | > If this licensing scheme does not suit you, contact us to see how we can
21 | make it work. For example,
22 | >
23 | > - If you have a solver released under a license which is compatible
24 | > with the AGPL and you would like to add it to SunCAE, feel free to
25 | > fork the repository (and create a pull request when you are done).
26 | > - If you have a solver released under a license which is not
27 | > compatible with the AGPL and you would like to add it to SunCAE,
28 | > [contact us](https://www.seamplex.com/suncae#contact).
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
101 |
--------------------------------------------------------------------------------
/doc/virtual.md:
--------------------------------------------------------------------------------
1 | # Setting up virtual machines to host SunCAE
2 |
3 | ## Vagrant
4 |
5 | ```terminal
6 | vagrant init debian/bookworm64
7 | vagrant up
8 | vagrant ssh
9 | ```
10 |
11 | ## Docker
12 |
13 | TBD
14 |
--------------------------------------------------------------------------------
/doc/workflow.md:
--------------------------------------------------------------------------------
1 | # New case
2 |
3 | #. if someone goes to the root `index.php` (at `html/index.php`) without and `id` or directly to `new/` then the "new case" page at `new/index.php` is shown
4 | #. that one includes `uxs/$ux/new.php`
5 |
6 | ## Faster-than-quick UX
7 |
8 | #. `uxs/faster-than-quick/new.php` shows the four choices
9 |
10 | 2. Physics
11 | 3. Problem
12 | 4. Solver
13 | 5. Mesher
14 |
15 | But the first one, which is the CAD, comes from `uxs/faster-than-quick/importers/$cadimporter.php`
16 |
17 | ## Upload-importer
18 |
19 | #. `uxs/faster-than-quick/importers/upload.php` shows a file upload HTML component with an onchange call to `upload_cad_file()` that after uploading the CAD, calls `process_cad()`.
20 | #. `process_cad()` in `uxs/faster-than-quick/new.php` calls `html/new/process.php` which includes `cadprocessors/$cadprocessor/process.php`
21 |
22 | ## Gmsh-processor
23 |
24 | #. `cadprocessors/gmsh/process.php` uses `cadimport.py` to process the uploaded CAD with Gmsh (through OCC) to create a `.xao`
25 | #. It calls `initial_mesh.sh` in background to create the first mesh.
26 | #. This `initial_mesh.sh` just calls `cadmesh.py` if `default.geo` does not exit.
27 | #. `cadmesh.py` performs five attempts to create an initial mesh by calling `trymesh.py` with the number of attempt $i$ as the argument
28 | #. `trymesh.py` merges `defaulti.geo` and then tries to come up with a max $\ell_c$
29 | #.
30 |
31 |
--------------------------------------------------------------------------------
/html/.htaccess:
--------------------------------------------------------------------------------
1 | # AuthType Basic
2 | # AuthName "Restricted Content"
3 | # AuthUserFile /home/gtheler/codigos/suncae/auths/htpasswd/.htpasswd
4 | # Require valid-user
5 |
--------------------------------------------------------------------------------
/html/ajax2mesh.php:
--------------------------------------------------------------------------------
1 |
107 |
--------------------------------------------------------------------------------
/html/change_step.php:
--------------------------------------------------------------------------------
1 | SunCAE found a fatal error:";
11 | echo $error;
12 | echo "
27 |
28 | GNU Affero General Public License version 3, or at your option, any later version.
29 | You can get a copy of the source code of this web interface here.
30 |
31 |