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.

Reading external data

Please login with a confirmed email address before reporting spam

I want to apply a waveform for whom the data was collected experimentally. So no mathematically derived equation. How can I apply this to a Comsol model?

5 Replies Last Post 2012年8月3日 GMT-4 19:21
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 2012年7月26日 GMT-4 16:53
Hi
have you considered to use an interpolated (higher order such as 2nd or 3rd order) function on your experimental function, this will gve a rather "smooth" shape, no ?

--
Good luck
Ivar
Hi have you considered to use an interpolated (higher order such as 2nd or 3rd order) function on your experimental function, this will gve a rather "smooth" shape, no ? -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年8月2日 GMT-4 16:16
This also is a possibility but I want an actual waveform to be the input.
This also is a possibility but I want an actual waveform to be the input.

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 2012年8月2日 GMT-4 16:51
Hi

what is for you the difference of the actual measured step-wise wavepoints and an interpolated polynomial function based on your data ?
The second case is smoother and alos the solver to take intermediate steps, and to calculate coerrect derivatives hence converges better.

--
Good luck
Ivar
Hi what is for you the difference of the actual measured step-wise wavepoints and an interpolated polynomial function based on your data ? The second case is smoother and alos the solver to take intermediate steps, and to calculate coerrect derivatives hence converges better. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年8月3日 GMT-4 16:11
OK, here is the data. Fit a curve through it.
0 0
0.05 0.0242
0.1 0.0919
0.15 0.1889
0.2 0.2939
0.25 0.3827
0.3 0.4318
0.35 0.4227
0.4 0.3455
0.45 0.2007
0.5 0
0.55 -0.235
0.6 -0.4755
0.65 -0.6898
0.7 -0.8474
0.75 -0.9239
0.8 -0.9045
0.85 -0.7867
0.9 -0.5805
0.95 -0.3081
1 0
1.05 0.309
1.1 0.5878
1.15 0.809
1.2 0.9511
1.25 1
1.3 0.9511
1.35 0.809
1.4 0.5878
1.45 0.309
1.5 0
1.55 -0.309
1.6 -0.5878
1.65 -0.809
1.7 -0.9511
1.75 -1
1.8 -0.9511
1.85 -0.809
1.9 -0.5878
1.95 -0.309
2 0
2.05 0.309
2.1 0.5878
2.15 0.809
2.2 0.9511
2.25 1
2.3 0.9511
2.35 0.809
2.4 0.5878
2.45 0.309
2.5 0
2.55 -0.309
2.6 -0.5878
2.65 -0.809
2.7 -0.9511
2.75 -1
2.8 -0.9511
2.85 -0.809
2.9 -0.5878
2.95 -0.309
3 0
3.05 0.309
3.1 0.5878
3.15 0.809
3.2 0.9511
3.25 1
3.3 0.9511
3.35 0.809
3.4 0.5878
3.45 0.309
3.5 0
3.55 -0.309
3.6 -0.5878
3.65 -0.809
3.7 -0.9511
3.75 -1
3.8 -0.9511
3.85 -0.809
3.9 -0.5878
3.95 -0.309
4 0
4.05 0.3081
4.1 0.5805
4.15 0.7867
4.2 0.9045
4.25 0.9239
4.3 0.8474
4.35 0.6898
4.4 0.4755
4.45 0.235
4.5 0
4.55 -0.2007
4.6 -0.3455
4.65 -0.4227
4.7 -0.4318
4.75 -0.3827
4.8 -0.2939
4.85 -0.1889
4.9 -0.0919
4.95 -0.0242
5 0
OK, here is the data. Fit a curve through it. 0 0 0.05 0.0242 0.1 0.0919 0.15 0.1889 0.2 0.2939 0.25 0.3827 0.3 0.4318 0.35 0.4227 0.4 0.3455 0.45 0.2007 0.5 0 0.55 -0.235 0.6 -0.4755 0.65 -0.6898 0.7 -0.8474 0.75 -0.9239 0.8 -0.9045 0.85 -0.7867 0.9 -0.5805 0.95 -0.3081 1 0 1.05 0.309 1.1 0.5878 1.15 0.809 1.2 0.9511 1.25 1 1.3 0.9511 1.35 0.809 1.4 0.5878 1.45 0.309 1.5 0 1.55 -0.309 1.6 -0.5878 1.65 -0.809 1.7 -0.9511 1.75 -1 1.8 -0.9511 1.85 -0.809 1.9 -0.5878 1.95 -0.309 2 0 2.05 0.309 2.1 0.5878 2.15 0.809 2.2 0.9511 2.25 1 2.3 0.9511 2.35 0.809 2.4 0.5878 2.45 0.309 2.5 0 2.55 -0.309 2.6 -0.5878 2.65 -0.809 2.7 -0.9511 2.75 -1 2.8 -0.9511 2.85 -0.809 2.9 -0.5878 2.95 -0.309 3 0 3.05 0.309 3.1 0.5878 3.15 0.809 3.2 0.9511 3.25 1 3.3 0.9511 3.35 0.809 3.4 0.5878 3.45 0.309 3.5 0 3.55 -0.309 3.6 -0.5878 3.65 -0.809 3.7 -0.9511 3.75 -1 3.8 -0.9511 3.85 -0.809 3.9 -0.5878 3.95 -0.309 4 0 4.05 0.3081 4.1 0.5805 4.15 0.7867 4.2 0.9045 4.25 0.9239 4.3 0.8474 4.35 0.6898 4.4 0.4755 4.45 0.235 4.5 0 4.55 -0.2007 4.6 -0.3455 4.65 -0.4227 4.7 -0.4318 4.75 -0.3827 4.8 -0.2939 4.85 -0.1889 4.9 -0.0919 4.95 -0.0242 5 0

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 2012年8月3日 GMT-4 19:21
Hi

even if your function looks like he product of a sinus and a gaussian, there is no reason why you can not load it, as is, into an interpolation table function in COMSOL, and as you have a fixed time stepping you can set a time stepping solver to strict stepping and range(0,0.05,5) and refer to your function for the BC condition of need. Then the result should be strictly based on your data.
You can also, as you have some 10 points per period, derive a derivative by a simple difference operator, if really needed

--
Good luck
Ivar
Hi even if your function looks like he product of a sinus and a gaussian, there is no reason why you can not load it, as is, into an interpolation table function in COMSOL, and as you have a fixed time stepping you can set a time stepping solver to strict stepping and range(0,0.05,5) and refer to your function for the BC condition of need. Then the result should be strictly based on your data. You can also, as you have some 10 points per period, derive a derivative by a simple difference operator, if really needed -- Good luck Ivar

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.