I am new to NG environment and would like to ask few questions:
I want to have a quick 3D poisson solver, because i need to recalculate it with thousand different charge distribution.
My questions maybe related to this:
What are the differences between Netgen, NGsolve and NGSpy?
My impression is that Netgen is the original proram, solely to generate mesh both surface and volume. While NGsolve is the FE solver and NGSpy is the python extension. IS this correct?
It also seems to me that NGsolve is no longer supported, and you move to the NGspy? with python interface?
(I also still cant run a single NgSolve’s 2d poisson , the program does not recognize ‘fespace’)
Because i need to do thousands poisson calcs, i will need to know the performance of this compared to its native c/c++ ? How slow do you think is the program compared to its implementation in full c/c++?
Suppose i want to write my own FE/ FV solver for my project, i need to know the voroni cells details, how do i extract this from netgen?
ad 1) Yes Netgen is the mesher and NGSolve is the finite element solver implemented in C++. NGSPy is just a Python interface to NGSolve, which provides an easy to access and steer frontend. All the expensive linear algebra stuff is implemented in C++. I think this is an answer to 2 as well. There are some costs using SymbolicIntegrators instead of purely defined C++ integrators, in most cases they are pretty neglectable, but if you only want to solve Poisson problem anyway, consider the Laplace integrator instead.
About running Poisson problems. Have you tried the i-tutorials (Interactive NGSolve Tutorial — NGS-Py 6.2.2302-87-ga5a5eff3b documentation)?
You can download them and go threw them interactively. Note that capitalization is relevant in Python, so it should be FESpace.
If you want to build your own FE solver, Netgen can export meshes to different formats, but I think it would be easier and faster (especially if you are not an advanced c++ user) to use NGSolve.
Thanks alot for the explanaton. I was able to correctly install from netgen/ngsolve source and run the examples and tutorials, this is a great tool. I will try to understand the structure of the codes , because i plan to modify it for my purpose. I will get back to you if iam stuck with this.
I have been playing around with the tutorials and (sort of ) understand how it works using python interface. I want to further play around with this, is there manual for this?
for example in 2D square area - dirichlet BC(poisson eqn), i want to put concentric and continuous charge distribution, then i will need to know the dimension of the square. How do i get this from the geometry i created.
In general i will need to have some kind of manual to play around with the parameters, such as retrieve the boundary grids data etc.
I look up the tutorial, i assume that the Constructive Solid Geometry CSG is the 3D mesh generator ? Does it also have the same procedure as in geom2D? For example if i want to set dirichlet boundary.
I assume you played around with the i-tutorials so far.
Did you also check out the documentation. I guess you should find most things you need.
for example in 2D square area - dirichlet BC(poisson eqn), i want to put concentric and continuous charge distribution, then i will need to know the dimension of the square. How do i gi-tutorialet this from the geometry i created.
[/quote] The “unit_square” which is used in the example you are talking about is defined as [0,1]x[0,1].
If you need something more complicated you have to construct the geometry using points and splines. Then you know the dimension anyway.
[quote]I look up the tutorial, i assume that the Constructive Solid Geometry CSG is the 3D mesh generator ? Does it also have the same procedure as in geom2D? For example if i want to set dirichlet boundary.[/quote] CSG is an option to construct three-dimensional geometries which can be meshed using Netgen. Here you can find a short explanation how CSG works.
Similar to the “geom2d” python module you can use the “csg” module (see i-tutorial on csg). There you can define boundary names which can be used to set boundary conditions within NGSolve (see docu on boundary conditions).
I hope I pointed you to the desired information. If you need more help, just attach your python file. It makes it easier to discuss about a problem.