Nek5000 has an Exit E problem with the mesh grid generated by gmsh - gmsh

A CFD problem, flow past a cylinder,
I need a mesh that can be refined, so I use gmsh to generate my own mesh,
but the mesh of gmsh cannot be used after being converted with gmsh2nek,
and BCs-related errors occur when nekmpi is running.
The error output as
initialize pressure solver
0 40160 BC FAIL
EXIT: E INVALID BC FOUND in genfast 46912
an error occured: dying ...
1 25376 BC FAIL
4 46912 BC FAIL
BTW, (0 based index) element 46912 has exceeded the maximum index, and elements 40160 25376 are at the junction of local refinement.
(1 based index) element 46912 is the last one, and elements 40160 25376 are outlet. But element 46912 is not in any special position
enter image description here
My gmsh grid generation code is too long to be placed here.
I have tried to find someone else's gmsh code, change the order of their own code definition edges and faces, refine and coarsen the grid are the same problem, but it is no problem to use the. re2 converted by someone else's. msh, but he did not provide. geo, and the grid is too large, and the precision is not enough.

Related

How to obtain accurate value of segment-distances and segment-weights for creating bendpoints?

I am trying to create edges with bends for a layout. Normally, I am using a haystack edge in the graph but whenever an edge bend has to be created, the curve-style of the edge is changed to segments. Currently, I am only creating edges with single bends. I have tried the code provided in this post but it is not creating proper edges. Currently, I am using the code from cytoscape.js-edge-editing, since it is creating better results.
The main problem is that the segment-distances values which cause the bendpoint to be created at the wrong location. Since, the functions in the above provided codes are not creating proper bendpoints, what is the right way to go about this?
A sample problem is as shown:
An edge bend has to created created in the edge from n12 to n15 where n12 is the source. The values of segment-distances and segment-weights are shown in the console. Having a positive value of segment-distances creates the bendpoint at the wrong position. It was actually supposed to be to the right of n12 and to the top of n15.
Whereas in another scenario, as shown in the following figure, an edge bend has to be created in the edge from n3 and n2. And the positions of these nodes are quite similar to n12 and n15 wrt each other. Their edge is given the same values of segment-distances and segment-weights as for the edge in the previous figure. And yet, the bendpoint is created (not accurately) but almost near to the expected location. Whereas the same value of segment-distance creates the bendpoint at the opposite location in the previous scenario.
I do not understand why this is happening. Can someone please guide me as how to solve this problem?
Refer to edge-distances:
edge-distances : With value intersection (default), the line from source to target for segment-weights is from the outside of the source node’s shape to the outside of the target node’s shape. With value node-position, the line is from the source position to the target position. The node-position option makes calculating edge points easier — but it should be used carefully because you can create invalid points that intersection would have automatically corrected.
https://js.cytoscape.org/#style/segments-edges
The intersection point is different from the node centre point (position).
If you want right-angled edges, you should probably just use taxi edges: https://js.cytoscape.org/#style/taxi-edges

Yosys ASIC synth flow QoR/PPA metrics

I'm relatively new to Yosys. I've been tinkering with it with some proprietary standard cell libraries and am trying to extract some QoR/PPA metrics, similar to those you can get from DC.
Minimum slack (including worst-case negative slack/WNS)
Max logic depth [0]
Cell area [1]
For [0], I know there's the ltp command, but it only reports topological paths per module. I tried flattening the design using flatten, but there still seems to be a hierarchy in the netlist. Where should I insert the flatten command to actually flatten the netlist?
For [1], I know you can get the number of cells in the netlist using the stat command, but this doesn't tell me the equivalent of DC's CellArea metric (since each cell has a different area). I could just build a library of cell areas for each cell type based on the cell library datasheet, but that's rather laborious.
Also, is it possible to specify a target clock rate for synthesis? I think for abc there was a -D flag for delay, but this sounds to me more like input delay rather than clock period.
Thanks!
-D passed to abc is indeed clock period, not input delay. When specified this should also cause abc to print slack information.
Have you tried stat -liberty file.lib to use a liberty file for cell areas? If this isn't calculating areas as expected (I didn't quite understand your issue) then please create a feature request on GitHub with the difference.
flatten should be run after hierarchy -top top_module_name to do hierarchical elaboration and set the top module.

Generate OPEN surface mesh from a set of 3D points

I have a set of points on an OPEN surface in 3D space.
I have identified a subset of points which lay on the boundary.
I mean to generate a triangulation of those points, which gives me an open surface and keeps my selected points on the boundary.
All references I found deal with (sometimes?) closed surfaces, e.g., CGAL.
See examples below.
In addition, some CGAL algorithms require oriented normals at each point, which I do not have.
Is there an available algorithm and code for this? (either CGAL Advancing_front_surface_reconstruction, properly handled, or any other)
See also this and this.
Example 1
I compiled and ran example reconstruction_surface_mesh.cpp from examples/Advancing_front_surface_reconstruction, out-of-the box (which uses file half.xyz as input for data points), and I obtained a closed surface:
I would like to get rid of the few triangles that close the surface.
I tried adding an extra point at the end of half.xyz, and I got
which is an open surface.
So far, with what I tested, I do not know:
How to indicate an open surface.
How to indicate which vertices lay at the boundary.
If this is a non-empty set (and it should have at least three vertices) this would imply an open surface.
Ideally, one would have a workflow which works without manual intervention.
Example 2
I compiled and ran example boundaries.cpp, out-of-the box (which also uses file half.xyz as input for data points).
The output is:
0 outliers:
Boundaries:
boundary
0.178269 0.438589 0.129521
0.0795598 0.419465 0.244812
0.0549683 0.377617 0.3119
-0.0295721 0.360972 0.329075
-0.111332 0.334417 0.342617
-0.186667 0.2953 0.346683
-0.2719 0.16555 0.375017
-0.336304 0.117058 0.339323
-0.393517 0.0775 0.285917
-0.421419 -0.126854 0.215271
-0.395217 -0.214417 0.20015
-0.354783 -0.2953 0.170767
-0.237067 -0.395867 0.172233
-0.178246 -0.438588 0.129553
0.0227767 -0.4873 0.0700833
0.220338 -0.438589 -7.23321e-06
0.293 -0.395867 0
0.36025 -0.334417 0
0.418077 -0.258382 6.0303e-05
0.46025 -0.17265 0
0.484417 -0.0425167 -0.0763333
0.485067 0.03875 -0.0782667
0.471547 0.117058 -0.076827
0.44605 0.197567 -0.0700833
0.4092 0.27125 -0.0433167
0.364885 0.329645 0
0.313633 0.377617 0.0441167
0.2509 0.41425 0.0879333
I did not find how to use this for
automatically removing triangles which would make my target boundary vertices not laying at the boundary.
Moreover, the output seems to be the list of boundary points, without the "spurious" triangles (I am not sure). I would like to specify this list.
The CGAL advancing front reconstruction algorithm does generate open surfaces in general.

Abaqus - stress-displacement elements are not allowed in a heat transfer analysis

I'm trying to simulate cooling of cylinder-shaped sample, but when I submit a job I get an error: stress-displacement elements are not allowed in a heat transfer analysis. I defined part, material(density, specific heat, conductivity), section, section assignments, mesh, instance, predefined field (temperature) in initial step, step-1 (heat transfer) with interaction (surface film condition). Where's the problem ?
Update:
I solved that problem: I had an incorrect element type. For the heat transfer simulation: Mesh -> Element Type -> Family -> Heat Transfer. I guess that also Convection/Diffusion option in the Hex tab should be selected.

connect line between two boxes avoiding passing others

I have several boxes (x,y,width,height) randomly scattered around, and some of them need to be linked from point (x1,y1) in box1 to point (x2,y2) in box2 by drawing a line. I am trying to figure a way to make such line avoid passing through any other boxes (other than box1 and box2) by drawing several straight interconnected lines to go around any box in the way (if it is not possible to go with one straight line). The problem is that I don't know an algorithm for such thing (let alone having a technical/common name for it). Would appreciate any help in the form of algorithm or expressed ideas.
Thanks
Assuming that the lines can't be diagonal, here's one simple way. It's based on BFS and will also find the shortest line connecting the points:
Just create a graph, containing one vertex for each point (x, y) and for each point the edges:
((x,y),(x+1,y)) ((x,y),(x-1,y)) ((x,y),(x,y+1)) ((x,y),(x,y-1))
But each of this edges must be present only if it doesn't overlap a box.
Now just do a plain BFS from point (x1,y1) to (x2,y2)
It's really easy to obtain also diagonal lines the same way but you will need 8 edges for each vertex, that are, in addition to the previouses 4:
((x,y),(x-1,y+1)) ((x,y),(x-1,y-1)) ((x,y),(x+1,y-1)) ((x,y),(x+1,y+1))
Still, each edge must be present only if it doesn't overlap a box.
EDIT
If you can't consider space divided into a grid, here's another possibility, it won't give you the very shortest path, though.
Create a graph, in which each box is a vertex and has an edge to any other box that can be reached without the line to overlap a third box. Now find the shortet path using dijkstra between box1 and box2 containing the two points.
Now consider each box to have a small countour that doesn't overlap any other box. This way you can link the entering and the exiting point of each box in the path found through dijistra, passing through the countour.
Put all (x,y) coords of the corners of the boxes in a set V
Add the start- and end coordinates to V.
Create a set of edges E connecting each corner that does not cross any box-side (except for the diagonals in the boxes).
How to check if a line crosses a box side can be done with this algorithm
Now use a path-finding algorithm of your choice, to find a path in the graph (V, E).
If you need a simple algorithm that finds the shortest path, just go with a BFS.
(This will produce a path that goes along the sides of some boxes. If this is undesirable, you could in step 1 put the points at some distance delta from the actual corners.)
If the edges may not be diagonal:
Create a large grid of lines that goes between the boxes.
Throw away the grid-edges that cross a box-side.
Find a path in the grid using a path-finding algorithm of your choice.