Skip to content
raziabdul edited this page Oct 4, 2023 · 23 revisions

Quick Start Guide

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:

domain

This is is essentially solving the PDE

$$ -k\nabla^2 T(x,y) = 0 $$

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

geom

PolyDE uses the sketch layers in .dxf to recognize the boundary conditions. The layers for this drawing are as below:

layers1

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

mesh1

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:

solCoarse

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!

solAdapt

Some examples of PolyDE are in the gallery.

Examples of 2D electromagnetic waves:

  1. 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:

parallelPlatesDxf

PolyDE reads the data of the model based on the layers in the CAD drawing:

parallelPlatesLayers

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:

mesh258

Solution of E_z along x with quadratic elements. The wave is nicely truncated:

phi = 0T solnE258P2pi0

phi = .25T solnE258P2pi90

phi = .5T solnE258P2pi180

Clone this wiki locally