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.
Conditional Geometry
Posted 19 mai 2014, 15:32 UTC−4 API, Geometry Version 4.4 6 Replies
Please login with a confirmed email address before reporting spam
Richard
Please login with a confirmed email address before reporting spam
The attached model may help. The physics are bogus, as you will see, but this file illustrates the use of geometry subsequences and if/else calls.
Best,
Jeff
Attachments:
Please login with a confirmed email address before reporting spam
Thank you for your quick response! Perhaps this is what you are trying to show me with the domino.mph file, but I am trying to define a geometry based on a conditional statement as explained in the help documentation which is shown in the attached image. If that's what you gave me sorry for not understanding it better (I'm quite new to COMSOL still). What would be awesome is a tutorial of sorts to understand how to use the feature. Again, thank you for your help!
Attachments:
Please login with a confirmed email address before reporting spam
Thank you for your quick response! Perhaps this is what you are trying to show me with the domino.mph file, but I am trying to define a geometry based on a conditional statement as explained in the help documentation which is shown in the attached image. If that's what you gave me sorry for not understanding it better (I'm quite new to COMSOL still). What would be awesome is a tutorial of sorts to understand how to use the feature. Again, thank you for your help!
Please login with a confirmed email address before reporting spam
The If calls are in the geometry subsequence called Domino, which you will find under the Global Definitions branch.
That subsequence is later called repeatedly in the Geometry 1 branch.
Jeff
Please login with a confirmed email address before reporting spam
That's exactly what I was looking for! Thank you very much for your help!
Richard
Please login with a confirmed email address before reporting spam
I am opening this subject again as I need to ask how to assign materials for the different geometry parts under the statements.
I have a difficulty assigning properly the materials as COMSOL only allows me to assign a material to the first if statement. Then the geometries under the rest 'else if' statements are assigned a material based on the first if automatically but not always in a right way. I need to be able to assign a material to each one of them myself but I can't find a way so far...I had some advices form COMSOL support team but it didn't seem to work.Any help would be much appreciated!
edit: I think I found a solution, based on the Domino model above. I will get back to this thread if I have any success to leave comments.
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.
