Robert Koslover
Certified Consultant
Please login with a confirmed email address before reporting spam
Posted:
1 year ago
11.07.2023, 11:19 GMT-4
Updated:
1 year ago
11.07.2023, 11:26 GMT-4
- Usually, from the physics perspective, one seeks to specify a continuous geometry with sufficient accuracy to represent your physical problem, and then to build the discrete mesh with sufficient detail to represent that continuous geometry with adequate fidelity. In my own work, I've never had to be concerned with setting boundary conditions point by point, at the individual node level. You can specify boundary conditions (e.g., a potential) as functions of coordinates, without paying detailed attention to the mesh (assuming it is fine enough). Would that not be sufficient in your case? Are you be willing to explain more about the physics problem you are trying to solve? 2. In regard to importing (x,y,z) information for your unusual boundary condition from an external file, consider setting up an interpolation function.
-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
1. Usually, from the physics perspective, one seeks to specify a continuous *geometry* with sufficient accuracy to represent your physical problem, and then to build the discrete mesh with sufficient detail to represent that continuous geometry with adequate fidelity. In my own work, I've never had to be concerned with setting boundary conditions point by point, at the individual node level. You can specify boundary conditions (e.g., a potential) as functions of coordinates, without paying detailed attention to the mesh (assuming it is fine enough). Would that not be sufficient in your case? Are you be willing to explain more about the physics problem you are trying to solve? 2. In regard to importing (x,y,z) information for your unusual boundary condition from an external file, consider setting up an *interpolation* function.
Please login with a confirmed email address before reporting spam
Posted:
1 year ago
11.07.2023, 13:43 GMT-4
Thanks for your response.
The boundary conditions cannot be fitted nicely to a function, as they are found by integrating over an inhomogeneous charge distribution, which is in turn found using data exported from a different comsol simulation, and cannot be fitted nicely. It is relatively easy to calculate this value at a fixed point using a python script. Assuming any function i define as the boundary condition would calculate that function at a fixed set of nodes, it would introduce less error to just calculate these values using my python script.
I'll look into the interpolation function to see if that works.
Thanks for your response.
The boundary conditions cannot be fitted nicely to a function, as they are found by integrating over an inhomogeneous charge distribution, which is in turn found using data exported from a different comsol simulation, and cannot be fitted nicely. It is relatively easy to calculate this value at a fixed point using a python script. Assuming any function i define as the boundary condition would calculate that function at a fixed set of nodes, it would introduce less error to just calculate these values using my python script.
I'll look into the interpolation function to see if that works.