Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
How to make reliable domain selections in a parametric model?
Posted 3 févr. 2014, 09:27 UTC−5 Geometry Version 4.4 2 Replies
Please login with a confirmed email address before reporting spam
Hello,
I have created a model using the JAVA API. The whole model is fully parametric. If the parameters are changed reasonably, the topology does not change. The model contains named selections to set up the electrostatic boundary problems, and to interface with a particle tracing code.
Unfortunately, the selections change dramatically if I make a very tiny change to the parameters.
1) compile the attached code and run it as it is. The named selections "Attractive electrode domain" and "Frame domain" are set up correctly
2) Change the value of the parameter 'bending_angle' to '46[deg]'. This is a minor change from 45[deg], and does not change the topology of the model. Run the .class file now. The above-mentioned selections are messed up.
Why does it happen, and how can I make an algorithmic selection of domains or boundaries in a parametric model? I created the model interactively in the GUI, and created the explicit selections also interactively, hoping that the internal numbering of the domains does not change if the topology of the model does not change. This doesn't seem to be the case. Did I mess up something?
I could of course use the Box selection method for example, figuring out the bounding boxes of my sub-domains, but this is a bit cumbersome. Is there no simpler way? Even a "Find domain containing the point (x,y,z)" function would be simpler than the Box selection.
The java file can be downloaded from here:
drive.google.com/file/d/0B32t7G3WoSUtZERNaFRJdmRlQzQ/edit?usp=sharing
Thank you
Daniel
I have created a model using the JAVA API. The whole model is fully parametric. If the parameters are changed reasonably, the topology does not change. The model contains named selections to set up the electrostatic boundary problems, and to interface with a particle tracing code.
Unfortunately, the selections change dramatically if I make a very tiny change to the parameters.
1) compile the attached code and run it as it is. The named selections "Attractive electrode domain" and "Frame domain" are set up correctly
2) Change the value of the parameter 'bending_angle' to '46[deg]'. This is a minor change from 45[deg], and does not change the topology of the model. Run the .class file now. The above-mentioned selections are messed up.
Why does it happen, and how can I make an algorithmic selection of domains or boundaries in a parametric model? I created the model interactively in the GUI, and created the explicit selections also interactively, hoping that the internal numbering of the domains does not change if the topology of the model does not change. This doesn't seem to be the case. Did I mess up something?
I could of course use the Box selection method for example, figuring out the bounding boxes of my sub-domains, but this is a bit cumbersome. Is there no simpler way? Even a "Find domain containing the point (x,y,z)" function would be simpler than the Box selection.
The java file can be downloaded from here:
drive.google.com/file/d/0B32t7G3WoSUtZERNaFRJdmRlQzQ/edit?usp=sharing
Thank you
Daniel
2 Replies Last Post 5 févr. 2014, 09:19 UTC−5