-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This quick start guide assumes you successfully installed all the prerequisites for PolyDE.
Uncompress the binary release to your home directory. Set up a project folder HeatInSquare in ~/PolyDE/Projects
Edit the file ~/PolyDE/FEMsettings.txt to include the line
PROJECTPATH = /home/<YourUserID>/PolyDE/Projects/HeatInSquare/
The end / is a must.
We're now ready to set up a project. Here's a simple example to run a computation in PolyDE.
We want to solve for the temperature distribution in a square plate where all sides are fixed with temperature values as below:
This is is essentially solving the PDE
with the Dirichlet BCs.
First, set up the project FEMsettings. Edit the file ~/PolyDE/Projects/HeatInSquare/FEMsettings.txt to include
POLYORDER = 1
MAXMESHSIZE = 0.6
SKINNYLIMIT = 26
LINSYS_DATA_TYPE = DP
PHYSICS_MODE = HEATTR
ADAPTION_TYPE = NONE
PolyDE reads the domain and boundary data of the model from a *.dxf file. In Linux, the best app to construct a 2D model is LibreCAD. The drawing in LibreCAD looks like this
PolyDE uses the sketch layers in .dxf to recognize the boundary conditions. The layers for this drawing are as below:
Save as heat.dxf in ~/PolyDE/Projects/HeatInSquare
In the bash CLI:
$ cd ~/PolyDE/Projects/HeatInSquare
$ acadnet heat.dxf
This generates the model data saved as netin.acd in the folder. This data is needed for meshing with triang
In the bash CLI:
$ triang
This generates the mesh data. The mesh looks like
To start the solution process, PolyDE needs to know the material data for material "mat". The material file mat.material is found in the example project directory ~/PolyDE/Projects/heatLShape01. Copy the file into the direcory as, then run solver as follows
In the directory ~/PolyDE/Projects/HeatInSquare, do
$ cp ~/PolyDE/Projects/heatLShape01/mat.material .
$ solver
To visualize the result, run post. Post needs the info in POSTsettings.txt provided in the exampled projects. Copy the file as before. Then, run the post to visualize the result.
$ post
You should get the solution with this coarse mesh:
Change the computation process by editing this line in the project FEMsettings.txt:
ADAPTION_TYPE = HP_ADAPT
ADAPT_STEPS = 10
Then type:
$ rm solution
$ solver && post
You will see the improved solution. That's it!
Some examples of PolyDE are in the gallery.
- TE mode wave propagation in parallel plate waveguide
The width of the air gap is 1mm. The input wave is of length lambda = 1.8 mm corresponding to 166.55 GHz input freq.
We create a 2D domain of the vacuum between the parallel plates of length 7 mm. To construct a terminating port, a PML layer of 1 mm is added. The complete CAD drawing is as below:
PolyDE reads the data of the model based on the layers in the CAD drawing:
The red line for layer labeled 0 denotes Dirichlet BC, a = 0 means homogenous Dirichlet, in this problem corresponds to perfect conductor.
The black line for layer labeled KONTUR denotes line, no BC applied.
The cyan line for layer labeled NEUMANN denotes general Neumann BC. In this problem the normal gradient to the line has a complex value b.
The green line for layer labeled USER 1 denotes a user input port. In this problem it reads the parameter WAVELENGTH in the FEMsettings.txt file of the project directory.
Mesh of 258 triangles:
Solution of E_z along x with quadratic elements. The wave is nicely truncated:
phi = 0T
phi = .25T
phi = .5T
Footer to edit