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.
Time-Variant Boundary Conditions on Comsol 4?
Posted 16.06.2011, 13:51 GMT-4 Version 4.2 7 Replies
Please login with a confirmed email address before reporting spam
I was just wondering how one creates transient boundary conditions in COMSOL 4? I am doing a simulation where I am just trying to vary the voltage on a metal plate, and I used the "electric currents" physics under the AC/DC module. For the plate's initial values, I did 1*(t<.5) - 10*(t>=.5), and solved for time range(0,.1,1); however, the solution looks like it is only looking at V = 1 for the entire duration of the simulation (after t>.5 the plate still has V = 1 and not -10) So I was just wondering if there was another place where I was supposed to edit values when I want to do a voltage pulse like that. Thanks in advance!
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
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)?
Please login with a confirmed email address before reporting spam
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
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.
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
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)?
Please login with a confirmed email address before reporting spam
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.
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.
