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.

Need help solving a stationary followed by time-dependent problem

Please login with a confirmed email address before reporting spam

I have a fluid flow problem with the inlet pressure driven by an interpolated function of time that has a large value at time 0. To solve this I set up a stationary problem to use inlet function value at time zero, then solve a time-dependent problem for t values of 0 through 1. Since my inlet pressure is a function of time funct(t), it produces an error when it tries to solve the stationary problem. I tried to get around this by defining my input function as:

func( if( depends(t), t, 0)[1/s] )

My read on this is that it should give func(0) during the stationary problem since t is not defined, and func(t) for the time-dependent problem, but it always gives func(0).

Anyone with any experience in doing what I am attempting?

4 Replies Last Post 2011年1月4日 GMT-5 01:21
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 2011年1月2日 GMT-5 03:00
Hi

have you tried to use a step function (Heaviside derivative step) to ramp up quickly your pressue value ?

--
Good luck
Ivar
Hi have you tried to use a step function (Heaviside derivative step) to ramp up quickly your pressue value ? -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月2日 GMT-5 13:52
Thanks, Ivar. I gave that some thought by changing my initial step from stationary to time-dependent, but then I have to deal with some way to figure out which time-dependent step I'm in in order to determine whether to use a constant or the function.

What I really would like to do is use is define my inlet based on:

func( t[1/s] )

The COMSOL documentation says that for stationary problems, t is defined as 0, which is what I want, However when I try to use this approach, I get a message "Failed to evaluate variable" for t, indicating it is undefined.

Any other thoughts?

Steve
Thanks, Ivar. I gave that some thought by changing my initial step from stationary to time-dependent, but then I have to deal with some way to figure out which time-dependent step I'm in in order to determine whether to use a constant or the function. What I really would like to do is use is define my inlet based on: func( t[1/s] ) The COMSOL documentation says that for stationary problems, t is defined as 0, which is what I want, However when I try to use this approach, I get a message "Failed to evaluate variable" for t, indicating it is undefined. Any other thoughts? Steve

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 2011年1月2日 GMT-5 14:16
Hi

I have noticed that, depending on version/patch too the behaviour with the internal variabloes such as "t" and "lambda" changes somewhat.
Often I define a parameter such as t=0, if accepted it solves the issue. But then when adding a transient solver often you get back the error message.
Another way, is to add a dummy (unused but declared) transient solver study case, this defines t=0 for you.

Now the heaviside (or v4 "step" function, already defined in v4) is typically used in transient, but you can also, for stationary use it to ramp with a local "Param" parameter

--
Good luck
Ivar
Hi I have noticed that, depending on version/patch too the behaviour with the internal variabloes such as "t" and "lambda" changes somewhat. Often I define a parameter such as t=0, if accepted it solves the issue. But then when adding a transient solver often you get back the error message. Another way, is to add a dummy (unused but declared) transient solver study case, this defines t=0 for you. Now the heaviside (or v4 "step" function, already defined in v4) is typically used in transient, but you can also, for stationary use it to ramp with a local "Param" parameter -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年1月4日 GMT-5 01:21
Ivar, with a little help from COMSOL support I was able to solve the problem. By defining the variable t as a global parameter with a value of 0, it was picked up and used by the stationary solver. The time-dependent solver then reused t for its own purposes.

Steve
Ivar, with a little help from COMSOL support I was able to solve the problem. By defining the variable t as a global parameter with a value of 0, it was picked up and used by the stationary solver. The time-dependent solver then reused t for its own purposes. Steve

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.