Uploaded October 2020 | Updated September 2026, 2 hours ago
When you make a comsol model from matlab, and if you use a base comsol model to generate the initial m file in matlab, it is very likely that you make a mistake in assigning boundary conditions to the right boundaries. Instead of assigning a property to fix boundary numbers, we shall create selection boxes and assign properties to those selection boxes. In that case even if the parameters of your model changes in matlab, the correct properties will be applied to the boundaries that you want.
When you make a comsol model from matlab, and if you use a base comsol model to generate the initial m file in matlab, it is very likely that you make a mistake in assigning boundary conditions to the right boundaries. Instead of assigning a property to fix boundary numbers, we shall create selection boxes and assign properties to those selection boxes. In that case even if the parameters of your model changes in matlab, the correct properties will be applied to the boundaries that you want.










