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.
Integrating an expression over discrete volumes within a domain
Posted 1 juin 2019, 07:20 UTC−4 Computational Fluid Dynamics (CFD), Simulation Apps, Results & Visualization Version 5.4 4 Replies
Please login with a confirmed email address before reporting spam
Dear COMSOL community,
I have a cylindrical domain as part of my COMSOL model, where I solve for the volumetric convective heat transfer (in W/m^3), among other things. When I use volume integration on this term in the Derived Values node, I get the total heat convected (in W) for the whole domain, which is good.
Now, I'd like to calculate and export the integrated heat value in W, but over discrete volumes within this domain in order to import and use them in another application. The other application uses a grid of 80 discrete volumes in the axial direction, each further divided into 20 volumes in radial direction, giving 1600 volumes in total (imagine a stack of concentric rings).
I would like to automate this volume integration and export process. I tried the following possibilities, but haven't reached a solution yet:
- Derived Values node: not sure if it is possible to use this feature for so many operations at once?
- Create a New Method under Application Builder: this seems like a solution, but my concern is, can I use the Volume Integration operator for a sub-domain, or does it work only on domain-level Selections?
- I saw some online discussions about creating artifical boundaries or splitting the domain in COMSOL already as per what is required by the other application. But would creating those 1600 domains make sense? Even then, I'd still have to automate the export somehow.
- I exported the Solution Data using the Export node to a text file (where I get W/m^3 values at x,y,z coordinates), which I could further process, say in Matlab. In that case, the question is what would be a scientifically correct way of integrating the per unit volume quantities at several coordinate locations within a discrete volume to obtain the total quantity for that discrete volume?
Any ideas?
Thanks a lot, Vikas