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.

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

Please login with a confirmed email address before reporting spam

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 Jun 19, 2017, 2:17 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jun 15, 2017, 2:05 a.m. EDT
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

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jun 15, 2017, 3:39 a.m. EDT
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

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jun 15, 2017, 10:03 a.m. EDT

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

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jun 15, 2017, 10:05 a.m. EDT

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.

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jun 17, 2017, 7:09 a.m. EDT
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

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jun 19, 2017, 2:17 a.m. EDT
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

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.