Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused primitive error #27

Closed
GMellar opened this issue May 17, 2022 · 11 comments
Closed

Unused primitive error #27

GMellar opened this issue May 17, 2022 · 11 comments

Comments

@GMellar
Copy link

GMellar commented May 17, 2022

Since the commit 418a8a9 I get unused primitive errors for overlapping cylinder primitives. It affects cases where a coaxial cable is created and a cylinder is connected to the end to connect the coaxial line to PCB board. Maybe these changes affected something else. I will try to create a test case.

Why is a cylinder primitive unused when there are no mesh line at the edges? Even when there are enough fine grid cells inside the cylinder it is not used.

@thliebig
Copy link
Owner

This should not happen, if the warning said it was not used, this will be the case. Please create a simple case to demonstrate this...

@GMellar
Copy link
Author

GMellar commented May 17, 2022

At the moment I'm using pyems to generate the structure so the python interface is used. OpenEMS does not handle the xml file directly. Can you elaborate this with the geometry xml file AppCSXCAD is able to open?

@thliebig
Copy link
Owner

Yes, that would be enough... But please make it as simple/small as you can...

@GMellar
Copy link
Author

GMellar commented May 17, 2022

test.zip

This test file defines a cylinder and cylinders around it. Cylinder0 property is never used though it has enough mesh cells which should use this property.

@thliebig
Copy link
Owner

thliebig commented May 17, 2022

Well all "smaller" cylinder seem to have the same priority (-1). And the material "cylinder0" is overlapping "air" and thus these seem to loose the priority fight... Having objects in the same space with the same priority is considered undefined behavior ...

@thliebig
Copy link
Owner

Please make sure all overlapping objects have different/correct priorities. So this does not look to be related to the last patch?

@GMellar
Copy link
Author

GMellar commented May 18, 2022

test.zip

Maybe this is not related to the last commit but after the new compilation of openems this error occured. See the attached file. There are now very different priorities where no equal priority is overlapping. This results in the same behaviour. Why is it undefined behaviour when the same priority overlaps a mesh cell?

@GMellar
Copy link
Author

GMellar commented May 18, 2022

test.zip

Another example with cylindrical shells where the shell geometry is not touching the cylinder. The cylindrical shells are completely ignored by the simulation.

@thliebig
Copy link
Owner

Well I forgot that if you write the xml file with python it only contains the structure and not the openEMS simulation setup... So I cannot easily run it... I will see if I can get it working and can see the problem.
Can you maybe check if the commit you mentioned is the problem and reset CSXCAD to a version prio to it? And want to make sure that it is not this commit...

@thliebig
Copy link
Owner

Please give the latest version a test, there was a bug in the new bounding box algorithm. Cylinder0 does not complain anymore.
But the material "air" still does, is that correct?

Why is it undefined behaviour when the same priority overlaps a mesh cell?

If you have e.g. two objects in two different materials (properties) and they overlap and have the same priority, which one should be used? I am currently not sure which one will win this, because it will depend e.g. on the order of the objects or properties and such, but this may change or depend on other things. Therefore I consider it undefined.
I hope that clarifies it? See also here

@thliebig
Copy link
Owner

Please feel free to reopen if the issues is still unclear or unsolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants