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.
Frequency-dependent meshing with parametric sweep
Posted 2011年2月24日 GMT-5 08:02 Parameters, Variables, & Functions, Studies & Solvers 10 Replies
Please login with a confirmed email address before reporting spam
www.comsol.com/support/knowledgebase/1103/
What I am having trouble with is plotting a single point graph with all the calculated frequencies. Only the frequencies for one parameter value is available at a time. In this example it would be nice to plot the entire range from 100-1500 Hz, instead of only 100-500Hz OR 600-1000Hz OR 1100-1500Hz.
Is it possible to do this?
If not, it seems to be a drawback of using a parametric sweep. It would be nice if the model would remesh itself if the maximum element size was defined as: 340/freq/6
Please login with a confirmed email address before reporting spam
In v4.1 if you use an "external" parametric sweep (not a solver continuation) you can get the model to remesh (or adapt the geometry if needed) based on a mesh dependence i.e. on frequency.
There is an example somewhere, (or was i at one of the COMSOL conference mini-courses ?)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thanks for your input, Ivar.
I don't know if you looked at the example-model in the link, but it is using a Frequency Domain study and already remeshes with increasing frequency. The problem is plotting for example SPL as a function of frequency over the entire range. I don't see how your suggestion helps this issue. Do you mean that changing to a Stationary study will help?
--
MSc. Acoustics using COMSOL for modelling loudspeakers and room acoustics.
no.linkedin.com/pub/tom-alexander-solg%C3%A5rd/27/600/1b3
Please login with a confirmed email address before reporting spam
I believe the trick used in the example (indeed I thought of another example with only an external parametrical sweep, somewhere in the RF, but its the same story) is that the external parametrical sweep not only remeshes, (and updates the geoemtry if required) but ALSO restarts the solver with "0" as initial conditions.
While the parametrical sweep in the solver continuatiuon node is running from previous calculated initial conditions as initial state for each internal parametrical sweep.
So you can fully drop the internal sweep and put everything on the external one, but the solver will fight longer as it starts each time from the original initial conditions
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Your explanation sounds logical, but I cannot quite understand how to translate it to the model. I am not sure what you mean with. Internal or external parametric sweeps. Do you mean that the "Parametric Sweep" as the external and the "Frequencies" under study settings of the "Frequency Domain" as the internal sweep?
I am also not sure of what you mean by the "solver continuatiuon node".
Thanks,
Tom A.
--
MSc. Acoustics using COMSOL for modelling loudspeakers and room acoustics.
no.linkedin.com/pub/tom-alexander-solg%C3%A5rd/27/600/1b3
Please login with a confirmed email address before reporting spam
Indeed, for me what I call an "external parametric sweep" is the "Study node "Parametric Sweep", I call it external while it loops around the full node tree from first to last node (including geometry, mesh, and considering the initial conditions as fresh from (usually default" "zero" initial state
The "internal sweep" is in the "Stationary Extension - Continuation sweep" or a "Time Dependent - Times = range()" or a "Frequency Domain - Frequencies = range()" ... This "sweep" does normally not reconsider the geometry, nor the mesh and restarts (for the initial conditions) the solver at step 2 and on from the previous step last calculated conditions
Hope I'm clearer now ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thanks for clarifying that, Ivar.
Bertil Nistad at COMSOL support sent me this model which I have modified slightly. It does what I wanted, and I learned something. :)
--
MSc. Acoustics using COMSOL for modelling loudspeakers and room acoustics.
no.linkedin.com/pub/tom-alexander-solg%C3%A5rd/27/600/1b3
Attachments:
Please login with a confirmed email address before reporting spam
Bertil Nistad at COMSOL support sent me this model which I have modified slightly. It does what I wanted, and I learned something. :)
Your attached file is for Comsol 4.1
Could you describe how it is set up?
Thanks
TT
Please login with a confirmed email address before reporting spam
-A parametric sweep is added with "freq" as the parameter and the wanted frequencies as parameter values.
The trick is to use a stationary study instead of a frequency domain study.
I hope this helps!
--
MSc. Acoustics using COMSOL for modelling loudspeakers and room acoustics.
no.linkedin.com/pub/tom-alexander-solg%C3%A5rd/27/600/1b3
Please login with a confirmed email address before reporting spam
343/freq/5
(speed of sound/frequency variable/elements per wavelength)
--
MSc. Acoustics using COMSOL for modelling loudspeakers and room acoustics.
no.linkedin.com/pub/tom-alexander-solg%C3%A5rd/27/600/1b3
Please login with a confirmed email address before reporting spam
Unfortunately the link in the first post, to knowledge base article 1103, is not working anymore.
Maybe is someone ably to help me?
My model contains a Frequency Domain study over a frequency range; range(fMin,fInterval,fMax)
A Parametric Sweep is added which sweeps the number of elements per wavelength. The parameter defining the maximum mesh size is a function of the number of elements per wavelength.
Is it possible to change a setting which causes the model to remesh the geometry for every frequency it sweeps through, as defined in the Frequency Domain study step?
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.
Suggested Content
- BLOG How to Automate Meshing in Frequency Bands for Acoustic Simulations
- KNOWLEDGE BASE Running parametric sweeps, batch sweeps, and cluster sweeps from the command line
- KNOWLEDGE BASE Error: Failed to compute elastoplastic strain variables
- KNOWLEDGE BASE Performing a Mesh Refinement Study
- FORUM Error with parametric sweep