Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

maybe(basic)questions about Netgen, NGsolve and NGSpy

More
6 years 8 months ago #130 by asilalahi
Dear Friends,

I am new to NG environment and would like to ask few questions:

My background:
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:
1. 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')

2. Performance
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++?

3. 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?

Best Regards,
Alexander silalahi
More
6 years 8 months ago #132 by christopher
Hi Alexander,

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 ( ngsolve.org/docu/nightly/i-tutorials/ )?
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.

Best
Christopher
More
6 years 8 months ago #142 by asilalahi
Dear Christopher,

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.

Regards,
ALex
More
6 years 7 months ago - 6 years 7 months ago #163 by asilalahi
Dear Chris,

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.


Best Regards,

Alex




Best,
Alex
Last edit: 6 years 7 months ago by asilalahi. Reason: Combining questions
More
6 years 7 months ago #170 by cwinters
Hi Alex,

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.

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.

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.

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.

Best,
Christoph
Time to create page: 0.175 seconds