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.
Exporting Volume Values (geometric properties) from COMSOL 3.4
Posted 2010年7月26日 GMT-4 00:00 10 Replies
Please login with a confirmed email address before reporting spam
I have a model composed of 508 subdomains (with different permeabilities in each one). Each subdomain has a different volume. I need these volumes for a theoretical calculation but I can't figure out how to export them! I can see the values ---> Postprocessing toolbar---> geometric properties---->(choose any subdomain). But I can't export them and would prefer not to write each value by hand.
Does anyone know the name of the volume expression in COMSOL or a simple way to export this expression.
Thanks,
Paul
Please login with a confirmed email address before reporting spam
the volum is simply the domain integration of 1, if you select all you get the total volume, so the quiquest would be to use matlab to run a postint on all items of the integrant "1", no ?
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Firstly, thank you for your timely response.
I agree with you that the volume is the domain integration with integrand "1". I have a couple of questions with regards to your solution (which sounds good by implementation is the problem):
Your solution: Use matlab to run a postint on all items of the integrant "1".
Q1. I have connected to MATLAB and then have exported my FEM structure. Is this the correct first step?
Q2. I am assuming postint is short for "post-processing integrate", correct?
Q3. Do you know how COMSOL specifies "all [the subdomains]" in MATLAB?
Q4. I have my workspace (in Matlab) composed of the solved problem (in COMSOL 3.4)... can you help me with the nomenclature for the subdomain integration (with the integrand of "1") in Matlab for each subdomain?
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Basically I agree its correct what you are sequencing. There is, typically for cases with a few items, in thew GUI the possibility to use an integration of
(dom=dest(dom))
instead of "1". But then you need to define al the destination items (possible even for 500 items).
Typically in V4 this would give you the list of the ID and the different volumes in a table easy to export to i.e. Excel
With matlab you can do it in any way around. The difficulty remains for me: how to identify your individual volumes with the ID numbner of COMSOL that is an increasing value, starting from (0,0,0) and going outwards
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Do you know how to specify "subdomain integrate" in the GUI post-processing subdomain tab? If so I can export this as a New Figure then produce an ascii file with all the data.
i.e. in the subdomain tab of the "plot parameters": display "[subdomain integrate](dom)" -----> my goal is for it to display the volumes for each subdomain visually, then export the ASCII file.
Basically I am asking how to write subdomain integration for the GUI.
Thanks,
Paul
Please login with a confirmed email address before reporting spam
Success!!!! I was looking at this problem in the completely wrong context... instead, I let comsol+Matlab do the word.
The theoretical equations I was using was the Upper and Lower Wiener bounds, where:
W_L=postint(fem,'1')/postint(fem,'1/kap_esdl');
and
W_u=postint(fem,'1/kap_esdl')/postint(fem,'1');
This was the theoretical equations I needed to solve (much like the T_avg equation in COMSOL help documentation). This is perfect!
Steps to take for other users:
1. Connect COMSOL to MATLAB
2. Export FEM structure
3. Then type W_L and W_u in the command window in MATLAB
Thanks for all your input,
Paul Selvadurai
Please login with a confirmed email address before reporting spam
I have a complex 3D model with 22 subdomains. The model was built and meshed in Comsol 3.5a. It now exists as one complete geometry. I wish to extract one of the subdomains and save this as a separate geometry! Please advise the best way forward.
Thanks
Tiaan
Please login with a confirmed email address before reporting spam
I don't know if you have processed data that you would like to accompany this subdomain geometry but if you don't then this shouldn't be too hard.
1. I would save your 22 subdomain model as something else, for example "singular_subdomain.mph"
2. In this model I would go to the 'draw' mode. You should be able to modify all subdomain in this mode granted you haven't coerced them into a singular solid.
3. Now, in your newly saved model, physically highlight and substract the domains that you don't want (by pressing backspace when they are selected). Do this until there is only the subdomain you wish to keep.
Regards,
Paul
Please login with a confirmed email address before reporting spam
I tried this now, but no luck.
The problem is that although the model has 22 subdomains, comsol recognises these as one geometry (Geom1). It does not give me the option to "Use analyzed geometries" in Draw Mode. I'm not sure why it does not split them into 22 different geometries. The geometries were constructed in matlab, meshed in GMESH then imported int Comsol and saved as a .mph. You think the problem may lie in that comsol recognises GMESH output as one complete geometry?
Thanks
Tiaan
Please login with a confirmed email address before reporting spam
Thanks
Tiaan
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.
Suggested Content
- FORUM Spatial volume integration in partial 3D domain from Derived values?
- FORUM Arrow volume expression
- BLOG Performing Topology Optimization with the Density Method
- BLOG How to Use Topology Optimization Results as Model Geometries
- KNOWLEDGE BASE Improving Convergence of Nonlinear Stationary Models