Daniel Bertilsson
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 year ago
Dec 5, 2023, 4:57 a.m. EST
To get a non-uniform spacing, you can use a Move feature instead of Array. In the x displacement text field, enter for example f({range(0,1,10)}), where f is a function, for example {range(0,1,10)}^2+{range(0,1,10)}. Then use a second Move feature to move the resulting moved objects in the y-direction.
To get a non-uniform spacing, you can use a Move feature instead of Array. In the x displacement text field, enter for example f({range(0,1,10)}), where f is a function, for example {range(0,1,10)}^2+{range(0,1,10)}. Then use a second Move feature to move the resulting moved objects in the y-direction.
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 year ago
Dec 5, 2023, 4:07 p.m. EST
Updated:
1 year ago
Dec 5, 2023, 4:13 p.m. EST
Hi Ilan,
For completeness sake, and although it is probably overkill for your needs, I'll mention that you could also use a model method to create your geometry. See this blog post for an example.
A couple of other approaches would consist in using MATLAB and LiveLink for MATLAB (assuming your COMSOL license includes it), or the COMSOL Java API.
But Daniel's approach is by far the simplest one so there's no reason for you to look further if it works for you.
Best regards,
Jeff
-------------------
Jeff Hiller
Hi Ilan,
For completeness sake, and although it is probably overkill for your needs, I'll mention that you could also use a model method to create your geometry. See [this blog post](https://www.comsol.com/blogs/how-to-create-a-randomized-geometry-using-model-methods/) for an example.
A couple of other approaches would consist in using MATLAB and LiveLink for MATLAB (assuming your COMSOL license includes it), or the COMSOL Java API.
But Daniel's approach is by far the simplest one so there's no reason for you to look further if it works for you.
Best regards,
Jeff
Please login with a confirmed email address before reporting spam
Posted:
1 year ago
Dec 19, 2023, 12:48 a.m. EST
Updated:
1 year ago
Dec 19, 2023, 12:48 a.m. EST
Thank you both for your responses! I ended up needing MATLAB with LiveLink for a different purpose, so this was an easy problem to start learning it with.
Thank you both for your responses! I ended up needing MATLAB with LiveLink for a different purpose, so this was an easy problem to start learning it with.