Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jan 25, 2012, 3:43 p.m. EST
Hi
I do not think COMSOL is calculating "wrong" but rather that you have defined some initial and BC conditions slightly different from the ones you had initially in mind.
One thin you MUST change manually, when applying periodic time series (check the doc), is to adapt the solver from "free" timesteps to "intermediate" or "strict", (there are also futher options but start with these) because the default settings are optimised for diffusion like solvers and there are a good chance that the "free"solver steps will jump over your defined periods, and then the interpolation of solutions onto your defined time steps will go wrong. So as for digital sampling be sure you have at least 4 time steps per periode, and if you want more than 10% precision define at least 10 time steps per periode (+ strict or at least intermediate mode). That for the minimum sover setting, but you can read more in the user and reference guide.
Normally if you have a sustained sinus type oscillation, one use a harmonic solver, that develop the equations of motion for omega with a defined amplitude, frequency and phase, and you study how this amplitudes evolves, without resolving the individual oscillations. Your results are then mostly rms values (be aware)
Finally, if you ahve a mechanical system at rest and you apply a sinus load, you need to ramp it up gently. otherwise it's as if you hit the tructure with a hammer to get the initial x,v,a all three correct at t=0, and hitting a mechnaical structure with a hammer is the preferred way to do modal analysis, as you excite many modes, whichmeans you need a very fine time steps to resolve all these modes. Furthermore, mostly in FEM you have no or little damping defined in the models, so higher excited modes hardly dissapear, the remain excited for ages (mostly far longer than what one expect to solve for), whcih again imposes time sampling in ms or below and that means ages to solve.
A true time solving of a mechanical structure under time varying loads can become quite complex, and te solutions are not necesarily "wrong" or there are good reasons why the solver fails
--
Good luck
Ivar
Hi
I do not think COMSOL is calculating "wrong" but rather that you have defined some initial and BC conditions slightly different from the ones you had initially in mind.
One thin you MUST change manually, when applying periodic time series (check the doc), is to adapt the solver from "free" timesteps to "intermediate" or "strict", (there are also futher options but start with these) because the default settings are optimised for diffusion like solvers and there are a good chance that the "free"solver steps will jump over your defined periods, and then the interpolation of solutions onto your defined time steps will go wrong. So as for digital sampling be sure you have at least 4 time steps per periode, and if you want more than 10% precision define at least 10 time steps per periode (+ strict or at least intermediate mode). That for the minimum sover setting, but you can read more in the user and reference guide.
Normally if you have a sustained sinus type oscillation, one use a harmonic solver, that develop the equations of motion for omega with a defined amplitude, frequency and phase, and you study how this amplitudes evolves, without resolving the individual oscillations. Your results are then mostly rms values (be aware)
Finally, if you ahve a mechanical system at rest and you apply a sinus load, you need to ramp it up gently. otherwise it's as if you hit the tructure with a hammer to get the initial x,v,a all three correct at t=0, and hitting a mechnaical structure with a hammer is the preferred way to do modal analysis, as you excite many modes, whichmeans you need a very fine time steps to resolve all these modes. Furthermore, mostly in FEM you have no or little damping defined in the models, so higher excited modes hardly dissapear, the remain excited for ages (mostly far longer than what one expect to solve for), whcih again imposes time sampling in ms or below and that means ages to solve.
A true time solving of a mechanical structure under time varying loads can become quite complex, and te solutions are not necesarily "wrong" or there are good reasons why the solver fails
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jan 26, 2012, 8:38 a.m. EST
Hi every one,
I am doing a very simple time-dependent study on Structural module in comsol. A very simple block which has all-side free is excited in one of the boundaries by a sine wave of : (0.1*sin*(W0*2*pi*t) (mm). (W0=66Hz) The block has 3*2*2 mm dimensions and is made up of Steel: E=2e11 Pa, rho=7850Kg/m^3 and nu=0.3. I got very strange results for this simple model:
When I run the model for 4 cycles (time-range(0,0.0001,4/66) ) it gives me different results comparing to exactly same model for 6 cycles (time-range(0,0.0001,6/66) ). I found that it is due to time-steps that the comsol considers by itself which are different with my imposed one and are also different in each simulations. (It seems the results are so sensitive to the time-steps) -( I have attached the graphs by MATLAB to this messege in a DOC file.)
I changed the time step solver to "Strict" and I found out the results are getting above each other Using MATLAB. However, I am not sure if the results are trustable. I reduced the strict time-steps to half and 1/4 and ... to see if I will get same results. The results were not exactly same. For some time steps there were serious problem for convergence and for some they had oscillations.
It is a really easy problem and I was really expecting the Comsol to solve it as easy as drinking water. I really do not know what is the best way of solving this problem and this issue. Cant Comsol solve it correctly by default? If it cant then what is the way that I can get rid of numerical errors while I am sure that my results are right. How should I choose my time steps?
This problem gets much more serious in more complex problems. I appreciate your help.
Masoud
Hi,
Can you upload your model.
I'm quite not getting your question.
I'm struggling on this as well so if i find something useful will let you know.
Regards
Glenston
[QUOTE]
Hi every one,
I am doing a very simple time-dependent study on Structural module in comsol. A very simple block which has all-side free is excited in one of the boundaries by a sine wave of : (0.1*sin*(W0*2*pi*t) (mm). (W0=66Hz) The block has 3*2*2 mm dimensions and is made up of Steel: E=2e11 Pa, rho=7850Kg/m^3 and nu=0.3. I got very strange results for this simple model:
When I run the model for 4 cycles (time-range(0,0.0001,4/66) ) it gives me different results comparing to exactly same model for 6 cycles (time-range(0,0.0001,6/66) ). I found that it is due to time-steps that the comsol considers by itself which are different with my imposed one and are also different in each simulations. (It seems the results are so sensitive to the time-steps) -( I have attached the graphs by MATLAB to this messege in a DOC file.)
I changed the time step solver to "Strict" and I found out the results are getting above each other Using MATLAB. However, I am not sure if the results are trustable. I reduced the strict time-steps to half and 1/4 and ... to see if I will get same results. The results were not exactly same. For some time steps there were serious problem for convergence and for some they had oscillations.
It is a really easy problem and I was really expecting the Comsol to solve it as easy as drinking water. I really do not know what is the best way of solving this problem and this issue. Cant Comsol solve it correctly by default? If it cant then what is the way that I can get rid of numerical errors while I am sure that my results are right. How should I choose my time steps?
This problem gets much more serious in more complex problems. I appreciate your help.
Masoud
[/QUOTE]
Hi,
Can you upload your model.
I'm quite not getting your question.
I'm struggling on this as well so if i find something useful will let you know.
Regards
Glenston
Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jan 26, 2012, 10:00 a.m. EST
Hi Miranda,
check also your other thread concerning the lamb waves
--
Good luck
Ivar
Hi Miranda,
check also your other thread concerning the lamb waves
--
Good luck
Ivar
Masoud Ghorbani Moghaddam
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jan 26, 2012, 1:07 p.m. EST
Dear Ivar,
First of all, thanks for your comprehensive response. It was really helpful and could solve the issue for the block. However, here are somethings that I should tell you about. I really appreciate if you have a look on them:
1) I changed the geometry to a more completed one, two masses inside each other (From Steel and Foam). Exactly same boundary conditions and applied load as the previous one (Free all sides and an applied displcament of Sin-Wave in one side). Applying "Strict" time-dependent solver. Exciting the structure near the eigenfrequency of the inside mass for same structure and same conditions but one for the duration of 4 cycles and the other one duration of 6 cycles, I got again different results from MATLAB. I have attached a plot for the vibration of inside mass to this post. (1st page of the attached file shows that a point on the excitation surface follows the correct trend of Applied Sine-Wave while in the 2nd page for same conditions the results at center of the inside mass are differenet)
2) I guess the problem with B.C and I.C should be the dominent one. I am applying the sin wave(0.1*sin(W0*2*pi*t)(mm)). (I know that applying a sin wave produces an initial velocity (0.1*W0*2*pi(mm/s)) however, it is not correct to type it in "initial Values" so I do not know how to apply it correctly).
3) you had told that applying the sine Wave will act as an Impulse on the system and produces many modes (I would think since Sine-Wave starts from zero, I would not see that behaviour). However, you had suggested to apply the load in a Ramp shape. May I know how can I apply it.
In general, how can I provide the correct I.C for the model? (I have posted a messege regarding my concern in I.C in another thread)
I really appreciate if you help me with this issue which has really killed me in past days.
Regards,
Masoud
Dear Ivar,
First of all, thanks for your comprehensive response. It was really helpful and could solve the issue for the block. However, here are somethings that I should tell you about. I really appreciate if you have a look on them:
1) I changed the geometry to a more completed one, two masses inside each other (From Steel and Foam). Exactly same boundary conditions and applied load as the previous one (Free all sides and an applied displcament of Sin-Wave in one side). Applying "Strict" time-dependent solver. Exciting the structure near the eigenfrequency of the inside mass for same structure and same conditions but one for the duration of 4 cycles and the other one duration of 6 cycles, I got again different results from MATLAB. I have attached a plot for the vibration of inside mass to this post. (1st page of the attached file shows that a point on the excitation surface follows the correct trend of Applied Sine-Wave while in the 2nd page for same conditions the results at center of the inside mass are differenet)
2) I guess the problem with B.C and I.C should be the dominent one. I am applying the sin wave(0.1*sin(W0*2*pi*t)(mm)). (I know that applying a sin wave produces an initial velocity (0.1*W0*2*pi(mm/s)) however, it is not correct to type it in "initial Values" so I do not know how to apply it correctly).
3) you had told that applying the sine Wave will act as an Impulse on the system and produces many modes (I would think since Sine-Wave starts from zero, I would not see that behaviour). However, you had suggested to apply the load in a Ramp shape. May I know how can I apply it.
In general, how can I provide the correct I.C for the model? (I have posted a messege regarding my concern in I.C in another thread)
I really appreciate if you help me with this issue which has really killed me in past days.
Regards,
Masoud
Masoud Ghorbani Moghaddam
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jan 26, 2012, 1:15 p.m. EST
Dear Miranda,
The problem with that Block was solved after applying the "strict" time stepping in the solver. However, as I had told in my other messege for a more complex model I have still problem which I guess it is due to I.C. I will attach the model of the block to this messege. But to get what you want it is better to run the MATLAB code. The below MATLAB code, gives you the results for a point at the right side of the block for 4 cycles. If you want to get information for other points or surfaces you should do the proper changes to the lines 78 an after.
Also if you want to get the results for different time-stepping or different number of cycles you should change the lines: 58 and 65.
Masoud
Dear Miranda,
The problem with that Block was solved after applying the "strict" time stepping in the solver. However, as I had told in my other messege for a more complex model I have still problem which I guess it is due to I.C. I will attach the model of the block to this messege. But to get what you want it is better to run the MATLAB code. The below MATLAB code, gives you the results for a point at the right side of the block for 4 cycles. If you want to get information for other points or surfaces you should do the proper changes to the lines 78 an after.
Also if you want to get the results for different time-stepping or different number of cycles you should change the lines: 58 and 65.
Masoud
Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jan 26, 2012, 3:45 p.m. EST
Hi
looking at your results I do not find your curves that different. Do not forget that with a fine time stepping you integrate any numerical error, so if your relative tolerance is slightly different you will end up with quite some error due to this accumulation of deltas for each step.
It's similar to the effect of mesh density (but that does not always integrate over time, but rahter change the gradients distributions spatially)
And what about some damping ?
You have material damping, viscous damping, and friction damping, among others, these will change your results in a far more drastic way. And mostly one do not even know these walues, or only with a reduced precision
--
Good luck
Ivar
Hi
looking at your results I do not find your curves that different. Do not forget that with a fine time stepping you integrate any numerical error, so if your relative tolerance is slightly different you will end up with quite some error due to this accumulation of deltas for each step.
It's similar to the effect of mesh density (but that does not always integrate over time, but rahter change the gradients distributions spatially)
And what about some damping ?
You have material damping, viscous damping, and friction damping, among others, these will change your results in a far more drastic way. And mostly one do not even know these walues, or only with a reduced precision
--
Good luck
Ivar