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
31 ott 2012, 15:59 GMT-4
Hi
there can be several issues, one that strikes me is that depending on your mdel, by applying dirac functions like that (boundary values changes abruptly, your are exciting many "modes" and your solver might go unstable. It's far better to use smoothed steps, as for the rect() function in the COMSOL GUI, these are based on the Heaviside step functions, that provide derivable functions over a steep transition.
Then you must ensure your model is not responding by oscillating for rapid boundary changes, in "solid" this can be improved, by ignoring the inertial terms (2nd time derivative values of the driving equations)
--
Good luck
Ivar
Hi
there can be several issues, one that strikes me is that depending on your mdel, by applying dirac functions like that (boundary values changes abruptly, your are exciting many "modes" and your solver might go unstable. It's far better to use smoothed steps, as for the rect() function in the COMSOL GUI, these are based on the Heaviside step functions, that provide derivable functions over a steep transition.
Then you must ensure your model is not responding by oscillating for rapid boundary changes, in "solid" this can be improved, by ignoring the inertial terms (2nd time derivative values of the driving equations)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
1 nov 2012, 19:20 GMT-4
Hi Ivar,
I made some tests trying to use constant boundary values from matlab, and I conclude that the interface is not working. I declared a vector with the same value in all lines and I made the algorithm to change the line every sampling time. I think that the global variables c, n are not working. I have no idea how I can simulate this conditions.
With a rect() function I can't reproduce the same values that are stored in the data file.
best regards
Hi Ivar,
I made some tests trying to use constant boundary values from matlab, and I conclude that the interface is not working. I declared a vector with the same value in all lines and I made the algorithm to change the line every sampling time. I think that the global variables c, n are not working. I have no idea how I can simulate this conditions.
With a rect() function I can't reproduce the same values that are stored in the data file.
best regards
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
5 nov 2012, 04:52 GMT-5
Hi Geovani,
I'm using a time dependent boundary condition and it perfectly works.
I suggest you to start programming an easier case, for instance a ramp function. Of course you can define everything in Matlab, and I believe is far better to define a continuous function instead than a discrete number of values. So, try to define an analytical function.
Coming back to your question, I'm not sure if I understood what you're asking.... Mind that the variable time t is a scalar which varies into its domain, then is discretized to be a scalar function which varies into its discretized domain. In Matlab the discretization is really easy since you just have to define a range of values of t. This is done in the model.sol sequence when defining a range for the feature 'tlist'. I didn't get what you mean with "compare the time with a 1x1 value", but all you can do is to play with the syntax range(t1,t2,dt)
Hope it helps!
Mattia
Hi Geovani,
I'm using a time dependent boundary condition and it perfectly works.
I suggest you to start programming an easier case, for instance a ramp function. Of course you can define everything in Matlab, and I believe is far better to define a continuous function instead than a discrete number of values. So, try to define an analytical function.
Coming back to your question, I'm not sure if I understood what you're asking.... Mind that the variable time t is a scalar which varies into its domain, then is discretized to be a scalar function which varies into its discretized domain. In Matlab the discretization is really easy since you just have to define a range of values of t. This is done in the model.sol sequence when defining a range for the feature 'tlist'. I didn't get what you mean with "compare the time with a 1x1 value", but all you can do is to play with the syntax range(t1,t2,dt)
Hope it helps!
Mattia
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
5 nov 2012, 05:43 GMT-5
Hi Mattia,
thanks for the help. I tryed to make the simulation in matlab, but I have a problem with the initial values, if you can see, I post this in the next link:
www.comsol.com/community/forums/general/thread/32751/#p89649
Did you have this problem ?
best regards
Hi Mattia,
thanks for the help. I tryed to make the simulation in matlab, but I have a problem with the initial values, if you can see, I post this in the next link:
http://www.comsol.com/community/forums/general/thread/32751/#p89649
Did you have this problem ?
best regards