Calculate timestep after meshing but before simulation #42
Replies: 2 comments 7 replies
-
|
Hi, in short, no such function does not exist, but I agree that it might be useful. Maybe you would like to contribute a function that takes the mesh and maybe the highest material values (or lowest speed of light) and calculates a simple CFL timestep from that? The longer answer is that calculating the (correct and final) time-step is not as easy as it sounds. In a first step the complete material averaging for the entire set of coefficients (including lumped elements and so on) has to be done to then be able to calculate the timestep. At this step the coefficients are almost done and simulation can start. Therefore having a very simple and rough estimation (see above) would be nice to have. best regards, |
Beta Was this translation helpful? Give feedback.
-
|
That would be useful indeed - I have also stumbled upon a similar situation in the past where it would be useful to know the timestep without having to invoke the simulation to run. By the way what kind of optimization algorithms have you been experimenting with? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Does OpenEMS provide an API to calculate the CFL / Rennigs time step after meshing but before running the simulation?
A little bit of context here: I am using OpenEMS to optimize the dimensions of a filter, which involves running a script to tweak its geometrical parameters in different ways. For instance, one of these parameters could be used to control how to notch certain section of a microstrip:
But since the optimizer performs a random search on the parameters within certain bounds, we can arrive to degenerate situations like this:
In which the small size of the notched part results into an extremely small step in that point, requiring an equally small time step that I would like to rule out before even starting the simulation.
Of course, you can say: "that's easy, just ensure the bounds do not allow situations like that". However, in some situations that is more easily said than done. The parameters may look sane, but at some point you end up with two sides of two unrelated elements too close together as projected in certain axis, resulting into a simulation that never ends.
One way to fix this would be by doing it myself: I traverse all the lines in the mesh, check the smallest step size in all directions, compute the CFL condition and that's it. But I'd prefer to ask before reinventing the wheel here.
Thanks in advance,
Beta Was this translation helpful? Give feedback.
All reactions