[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
Lasse Murtomäki
Posted: 4 months ago 2017年6月15日 GMT-0400上午2:05
Use the Heviside function. Like this:

(1-flc2hs(t[1/d]-4,0.01))*(your function)

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


Use the Heviside function. Like this: (1-flc2hs(t[1/d]-4,0.01))*(your function) BR Lasse [QUOTE] 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 [/QUOTE]

Henrik Sönnerlind COMSOL Employee
Posted: 4 months ago 2017年6月15日 GMT-0400上午3:39
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
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 2017年6月15日 GMT-0400上午10:03

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


Thank you for your response.
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



[QUOTE] 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 [/QUOTE] Thank you for your response. 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 2017年6月15日 GMT-0400上午10:05

Use the Heviside function. Like this:

(1-flc2hs(t[1/d]-4,0.01))*(your function)

BR
Lasse



Hi Lasse,

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



[QUOTE] Use the Heviside function. Like this: (1-flc2hs(t[1/d]-4,0.01))*(your function) BR Lasse [/QUOTE] Hi Lasse, Thank for your advice. But I think I cannot implement your answer because I cannot put anything on the outflow boundary condition.

Posted: 4 months ago 2017年6月17日 GMT-0400上午7:09
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?

Thank you in advance,

Regards,
JN
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? Thank you in advance, Regards, JN

Henrik Sönnerlind COMSOL Employee
Posted: 4 months ago 2017年6月19日 GMT-0400上午2:17
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

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: https://www.comsol.se/blogs/how-to-make-boundary-conditions-conditional-in-your-simulation/ Regards, Henrik

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.