Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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 domain study - changing the force on a point load with frequency

Please login with a confirmed email address before reporting spam

Hi,

I'm having some trouble finding out how to apply a frequency-dependant force.

I have a model where up until now, I've been using a non-varying force of 1N on a point load, then performing the frequency study. To validate a project I am working on, I now need this force to change at each frequency step. The value of this force is in a vector in MATLAB. What I'd like to do is export this vector in some format COMSOL can read, and then 'instruct' COMSOL to vary the force at the point load at each frequency step according to the value of this imported file.

To summarise, I have a frequency study of N steps, and a vector of N length - I want COMSOL to change the point load at X frequency to whatever the value is at X position in the force vector.

How can I achieve this?

I have looked at parametric sweeps but I can't find (or more likely understand) how I can use this to import a csv or txt file from MATLAB. Also, I am under the impression that by using a parametric sweep I would end up with N * N results as COMSOL would run the full frequency study for each value of the parameter I specify. This is entirely undesirable as I can see this taking a long time to process and probably even longer to extract the useful data!

Any help would be greatly appreciated. My Google-Fu has failed me and I have found nothing in the manual that covers this type of study, though I assume a frequency dependent force is not entirely unheard of for people doing acoustic studies?

Many thanks,

Myles

1 Reply Last Post 2014年1月14日 GMT-5 09:44

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014年1月14日 GMT-5 09:44
Hi!

You can make a text file containing your vector of frequencies and forces, then right click Global definitions node-> functions->interpolation. Load your text file containing frequency as 't' and force as 'f(t)' and choose a good function name. Lets assume you choose 'Force' as your function name, go into the boundary condition node and choose your Point Load and enter Force(2) as the input force. This loads column 2 of the interpolation function. Now for the frequency response create a sweep or a list of frequencies you want to run.

This is a very useful technique that can be applied to many problems.


Hope this helps
--
/RVN
Hi! You can make a text file containing your vector of frequencies and forces, then right click Global definitions node-> functions->interpolation. Load your text file containing frequency as 't' and force as 'f(t)' and choose a good function name. Lets assume you choose 'Force' as your function name, go into the boundary condition node and choose your Point Load and enter Force(2) as the input force. This loads column 2 of the interpolation function. Now for the frequency response create a sweep or a list of frequencies you want to run. This is a very useful technique that can be applied to many problems. Hope this helps -- /RVN

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.