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.

periodic inlet condition

Please login with a confirmed email address before reporting spam

Hi,

I am using the Transport of Diluted Species module (2D) and I want to apply a periodic square wave input for concentration.

My geometry is a simple rectangle and the left side of the rectangle is the inlet.

How do I use the 'rectangle' input for the inlet?

Is there any other way to specify a square wave as the inlet condition for species concentration?





3 Replies Last Post 13.12.2011, 01:23 GMT-5
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 12.12.2011, 01:48 GMT-5
Hi

have you tried the "waveform" functions in V4 ? these should do. They do also include a smoothing region to remain continuous, but they do not include any "offset", so you must combine them then with a other analytical function

--
Good luck
Ivar
Hi have you tried the "waveform" functions in V4 ? these should do. They do also include a smoothing region to remain continuous, but they do not include any "offset", so you must combine them then with a other analytical function -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.12.2011, 15:46 GMT-5
Hi Ivar,

Thanks for your reply.

I tried using the waveform function. It appears to be what I am looking for.

But how do I apply such a waveform to the inlet as a periodic condition for concentration of species?

I also did not understand what you meant by combining the waveform with another analytic function
Hi Ivar, Thanks for your reply. I tried using the waveform function. It appears to be what I am looking for. But how do I apply such a waveform to the inlet as a periodic condition for concentration of species? I also did not understand what you meant by combining the waveform with another analytic function

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 13.12.2011, 01:23 GMT-5
Hi

the waveform is defined symmetric around "0" if you need to offset it, you might by calling it from another analytical function.

To use that in a BC definition you "simply" call the function depending on your time variable "t" i.e. wv1(t[1/s]) where the [1/s] is to make "t" without units and expressed in seconds (you might want to use "min" or "h" or "d" or "a" or "y" for minutes, hours, days or years/années instead of "s" for seconds"

This supposes that you use a time dependent solver.

Note: if for any reason you use a stationary solver to get the initial conditions, then the "t" will NOT be defined by default so your BC relying on "t" will be flagged ERROR. Try then to define a Parameter t = 0[s] this will solve the issue for the stationary solver, and the variable will be overwritten by the time dependent solver correctly

--
Good luck
Ivar
Hi the waveform is defined symmetric around "0" if you need to offset it, you might by calling it from another analytical function. To use that in a BC definition you "simply" call the function depending on your time variable "t" i.e. wv1(t[1/s]) where the [1/s] is to make "t" without units and expressed in seconds (you might want to use "min" or "h" or "d" or "a" or "y" for minutes, hours, days or years/années instead of "s" for seconds" This supposes that you use a time dependent solver. Note: if for any reason you use a stationary solver to get the initial conditions, then the "t" will NOT be defined by default so your BC relying on "t" will be flagged ERROR. Try then to define a Parameter t = 0[s] this will solve the issue for the stationary solver, and the variable will be overwritten by the time dependent solver correctly -- 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.