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.
Oscillations
Posted 18 ott 2012, 11:09 GMT-4 Modeling Tools & Definitions, Parameters, Variables, & Functions Version 4.2a 6 Replies
Please login with a confirmed email address before reporting spam
I'm seeing oscillations emerge in my model (a 1D mass flow situation), and I was wondering: is it possible for these oscillations to emerge due to the solver (too coarse a mesh or timestep?)?
I've tried a couple meshes down to what is reasonable, and a few timesteps, so I suspect it is a result of my model itself but I wanted to check with the community just to know, if only for my own erudition, if the solver itself can induce spatial or temporal oscillations.
Thank you,
Please login with a confirmed email address before reporting spam
indeed depending on several parameters, and the model, you might get oscillations while solving.
Some might be physical in the time domain: if you have step functions that excite many modes of your system,
Other might be purely numerical from typical effects as you state: mesh density, initial conditions BC gradients all not well behaved ...
That is what model validation and verification is all about, to sort these side effects and remove them
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I suspect that this might be part of the problem, but I want to make sure I am understanding it right:
I set my initial conditions to something (a spatial gaussian to be specific), and when I plot the variable for the initial state it looks good, but when I plot the the resulting variables at time = 0,they look different, and in fact are spatially oscillatory, which might give rise to the oscillations that follow.
Is it changing my initial condition, or is the time = 0 it is showing me really after a single timestep forward?
Please login with a confirmed email address before reporting spam
I have a 1D mass flow system, and I wanted the two ends of the system to be infinite sources or sinks of mass (the closest analogy is if we had a solution between two reservoirs with fixed concentration, and we were looking at the motion of salt ions in the solution under the influence of an electric field). My instinct was to fix the concentration at those two boundaries.
BUT, that's like holding down two ends of a string, since I'm really demanding that the *system* maintain that concentration, I'm not providing or sinking concentration from the outside. That gives me my oscillations.
So what *can* I use to model an infinite source or sink? I thought of using the Flux/source boundary condition as a function of the concentration, so that if the concentration deviates from the 'bath' concentration, an infinite source or sink is provided, but I don't quite understand the equation in the Flux/source BC - it seems that it is defining a gradient at the edges, but I want that gradient to depend on the concentration, which my crude attempts at have not solved the problem.
Please login with a confirmed email address before reporting spam
What about doing it the "quick" way à la "laminar inflow region" ?
You add some extra length at the input and the output, that you do not consider for your model and leave the system stabilise there.
Then something often forgotten, check your initial conditions.
Often one have very steep gradients (particularly for diffusion equations) along constant value boundaries, of flux inlet when the domain is at initial conditions = "0".
Then its useful to analyse the gradients of your dependent variables and ensure you have a fine mesh perpendicular to the flux in these regions (I often add "boundary mesh" elements). This particularly in time stepping solver cases.
Then solve, and as said before, do not consider the first entrance/exit length as part of your model for postprocessing
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I'll give that a try, and for the BC for my PDEs I'll enforce continuity at the boundaries?
As for the IC yeah I checked that and those are right and appear stable.
I'll also try to make the mesh denser near the boundary.
Please login with a confirmed email address before reporting spam
What is the most appropriate way to do that? I could provide an inequality in my PDE equations (dC/dt = 0 when x is in the bath region), but I'm wondering if there is a better way of doing it?
Also, I am using Identity pairs and enforcing continuity as a BC to couple my costant-concentration baths to the region of interest at the ends, hopefully that is the appropriate approach.
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.