# Discussion Forum

## [ht] switch on/off the outflow boundary condition as a time function

Hi,

I am simulating a heat transfer in porous media [ht module].
I want to switch on/off the outflow boundary condition as a function of time.

For example:

Outflow 1 ON if t< 4 [d]
Outflow 1 OFF if t>= 4[d]

Outflow 2 ON if t>= 4[d]
Outflow 2 OFF if t< 4[d]

Thank you,

Best Regards

6 Replies Last Post 2017年6月19日 GMT-0400上午2:17
Posted: 4 months ago
Use the Heviside function. Like this:

BR
Lasse

Hi,

I am simulating a heat transfer in porous media [ht module].
I want to switch on/off the outflow boundary condition as a function of time.

For example:

Outflow 1 ON if t< 4 [d]
Outflow 1 OFF if t>= 4[d]

Outflow 2 ON if t>= 4[d]
Outflow 2 OFF if t< 4[d]

Thank you,

Best Regards

Posted: 4 months ago
Hi,

The Outflow condition is, with respect to temperature, identical to a Thermal Insulation (the default boundary condition).

Thermal Insulation (and Outflow) are actually boundary conditions 'doing nothing'. They have no input, and add neither constraints nor weak contributions.

So the question is what you really want to achieve here. What should happen during the time when it there is not an outflow?

Regards,
Henrik

Posted: 4 months ago

Hi,

The Outflow condition is, with respect to temperature, identical to a Thermal Insulation (the default boundary condition).

Thermal Insulation (and Outflow) are actually boundary conditions 'doing nothing'. They have no input, and add neither constraints nor weak contributions.

So the question is what you really want to achieve here. What should happen during the time when it there is not an outflow?

Regards,
Henrik

I'm simulating a reoriented potential mixing of geothermal reservoir. The reservoir is modelled as a 2D circular with 8 wells on its circumference with 45 degree distance between the wells.
The well in the model will act as injection well and production well.
For example: Well 1 is injection well at time 0-4 days and will be production well at time 16-20 days.
This way, geometrically I only have 8 wells but they will act as 8 injection wells and 8 production wells.

The problem is I cannot set all production wells as an Outflow. (If I do this, all injection wells will overridden by production wells)
What should happen is:

at time : 0-4 days --> injection well 1 and production well 1 active, another wells are deactivated.
at time : 4-8 days --> injection well 2 and production well 2 active, another wells are deactivated
And this scheme will continue until 32 days.

I tried to attach my mph file, but the site always say that the file extension is error.

Thank you very much for your help

Posted: 4 months ago

Use the Heviside function. Like this:

BR
Lasse

Hi Lasse,

But I think I cannot implement your answer because I cannot put anything on the outflow boundary condition.

Posted: 4 months ago
Hi Henrik,

My above question can be simplified as below:

If I want to set a boundary as an outlet, what is the node that I can choose as an alternative of outflow node?

Regards,
JN

Posted: 4 months ago
Hi,

There is not built-in setting for switching between different types of boundary conditions withing a single study step. You can however use the methods described in this blog post:

www.comsol.se/blogs/how-to-make-boundary-conditions-conditional-in-your-simulation/

Regards,
Henrik