Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
16 giu 2011, 14:29 GMT-4
It looks like you are confusing initial conditions and boundary conditions. An initial value cannot be a function of t.
It looks like you are confusing initial conditions and boundary conditions. An initial value cannot be a function of t.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
16 giu 2011, 15:00 GMT-4
Ahh, okay. So when I right click on the physics tab under my model (in my case "Electrical Currents (ec)"), I'd want to use the conditions with the purple thingy-mabob plastered on the white domain, instead of just the domain?
If so, they tell me I have a singularity at roughly 125 us with the function when I did:
1e-6* (t<125e-6) + 1*(t>125e-6 && t<375e-6)
on the appropriate BOUNDARIES this time and not the initial conditions. So I assume I'll need a ramp-up to 1V? I was wondering how this could be achieved, because when I try to multiply the latter term by a function of t, it tells me that the "deduced units" is in time. I vaguely recall that in the comsol 3 versions, one was able to multiply boundary conditions by t without worrying about the units (i.e. COMSOL would see 1*t as units of volts, even though it appears to be in time)?
Also, I'm fairly new to COMSOL 4, and was wondering if there are very detailed tutorials on the transient stuff (I haven't been able to find any--well, at least not for COMSOL 4, even in the COMSOL manual)?
Ahh, okay. So when I right click on the physics tab under my model (in my case "Electrical Currents (ec)"), I'd want to use the conditions with the purple thingy-mabob plastered on the white domain, instead of just the domain?
If so, they tell me I have a singularity at roughly 125 us with the function when I did:
1e-6* (t125e-6 && t
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
16 giu 2011, 15:42 GMT-4
Yes, we don't recommend using boolean expressions for quantities that vary in time. The solvers don't like that - Try computing the time derivative of such an expression!
Instead you can use smoothed step functions. Creating such functions is highly automated in the v4.x releases. Just go to Definitions>Functions and you'll see how it works.
Regarding your other point, the behavior of functions is different depending on the version you're using. In version 4.1 and earlier, functions always took unitless arguments and returned unitless outputs.
Starting at v4.2 you can specify units for your function arguments and outputs if you wish.
You shouldn't enter an expression with dimensions of time in a text field where the software is expecting a voltage. That's an error on your part that the software will detect and let you know about.
Yes, we don't recommend using boolean expressions for quantities that vary in time. The solvers don't like that - Try computing the time derivative of such an expression!
Instead you can use smoothed step functions. Creating such functions is highly automated in the v4.x releases. Just go to Definitions>Functions and you'll see how it works.
Regarding your other point, the behavior of functions is different depending on the version you're using. In version 4.1 and earlier, functions always took unitless arguments and returned unitless outputs.
Starting at v4.2 you can specify units for your function arguments and outputs if you wish.
You shouldn't enter an expression with dimensions of time in a text field where the software is expecting a voltage. That's an error on your part that the software will detect and let you know about.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
16 giu 2011, 17:09 GMT-4
So I put in a rectangle pulse (lower limit = 0, upper limit = 1, size of transition = .1), but how do I have this rectangular pulse be a boundary condition? A lot of the things I've googled just tell me about these functions, but don't go into exactly how I'd apply the functions into a boundary condition? For example, I want the pulse to be 0 for the first 125 us, then 1 for the next 250 us, then 0 again for an electric potential at some boundary. I have the rectangular function under definitions (rect2), and I have Electric Potential 1 for the boundary condition, but how do I put them together?
I tried putting "rect2" under V_0 in the electric potential, under "Electrical Currents (ec)" in the AC/DC module, but it tells me that "rect2" is an unknown variable. I then tried "rect2()", but then it told me I'm supposed to have an argument for the function, except I'm not quite sure what the input refers to.
So I put in a rectangle pulse (lower limit = 0, upper limit = 1, size of transition = .1), but how do I have this rectangular pulse be a boundary condition? A lot of the things I've googled just tell me about these functions, but don't go into exactly how I'd apply the functions into a boundary condition? For example, I want the pulse to be 0 for the first 125 us, then 1 for the next 250 us, then 0 again for an electric potential at some boundary. I have the rectangular function under definitions (rect2), and I have Electric Potential 1 for the boundary condition, but how do I put them together?
I tried putting "rect2" under V_0 in the electric potential, under "Electrical Currents (ec)" in the AC/DC module, but it tells me that "rect2" is an unknown variable. I then tried "rect2()", but then it told me I'm supposed to have an argument for the function, except I'm not quite sure what the input refers to.
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
16 giu 2011, 17:12 GMT-4
Have you tried rect2(t)?
Have you tried rect2(t)?
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
16 giu 2011, 18:30 GMT-4
It says: "unexpected unit of input."
I don't really understand what rect1(t) does specifically? In the function rect1, I chose an upper and lower limit, but the x-axis (I'm assuming time), is automatically chosen to be -2 to 1. So if I were to put rect1(t), where in my simulation, t goes from 0 to say 600 us, how will the actual voltage waveform look?
Are the x-axis values automatically scaled to the timeframe we specified for our simulation, and if that is the case, how come the x-axis for rect1 changes when I change the transition zone? Or is t literally substituted onto rect1(t), such that if I specified a simulation time from range(0,6e-6,600e-6), then putting rect1(t) into the boundary voltage input will give me only that portion of rect1(t) (i.e. the x-axis in rect1(t) is literal and not scaled)?
It says: "unexpected unit of input."
I don't really understand what rect1(t) does specifically? In the function rect1, I chose an upper and lower limit, but the x-axis (I'm assuming time), is automatically chosen to be -2 to 1. So if I were to put rect1(t), where in my simulation, t goes from 0 to say 600 us, how will the actual voltage waveform look?
Are the x-axis values automatically scaled to the timeframe we specified for our simulation, and if that is the case, how come the x-axis for rect1 changes when I change the transition zone? Or is t literally substituted onto rect1(t), such that if I specified a simulation time from range(0,6e-6,600e-6), then putting rect1(t) into the boundary voltage input will give me only that portion of rect1(t) (i.e. the x-axis in rect1(t) is literal and not scaled)?
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
16 giu 2011, 19:44 GMT-4
It is indeed literally substituted.
Since you're starting out with the software, I strongly encourage you to read through the software's manuals (first and foremost the User's Guide for the core package), work through some of the tutorials in the model library and to consider attending a COMSOL training course to speed up your learning curve.
It is indeed literally substituted.
Since you're starting out with the software, I strongly encourage you to read through the software's manuals (first and foremost the User's Guide for the core package), work through some of the tutorials in the model library and to consider attending a COMSOL training course to speed up your learning curve.