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.

Making a loop in comsol

Please login with a confirmed email address before reporting spam

Hi,

I wanted to make a loop in COMSOL for the inlet temperature but this temperature would be different in each time step. Step 1: T_in(0s)=10C Step 2: T_in(1s)=T_out(0s)+T_load(1) Step 3: T_in(2s)=T_out(2s)+T_load(2) and so on. The simulation is just a Uloop pipe and and there is an inlet and outlet. The outlet is defined as heat outflow. As I know the outlet temperature is defined as "root.comp1.out1" in comsol.

Thanks.


3 Replies Last Post Feb 24, 2020, 11:06 a.m. EST
Lars Dammann COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Feb 24, 2020, 3:20 a.m. EST

Hi Bilal, you can specify boundary conditions that depend on time, for example you can define T to be 20[degC]+t*1[K/s] to start with 20° at t=0 and then increase the temperature over time. You can also define helper functions to make this easier. Please note that your boundary conditions should be continuous in time. If you have sudden jumps, you may want to use the events interface. This blog shows an example of that: https://www.comsol.de/blogs/implementing-a-thermostat-with-the-events-interface/

Best wishes, Lars

Hi Bilal, you can specify boundary conditions that depend on time, for example you can define T to be `20[degC]+t*1[K/s]` to start with 20° at t=0 and then increase the temperature over time. You can also define helper functions to make this easier. Please note that your boundary conditions should be continuous in time. If you have sudden jumps, you may want to use the events interface. This blog shows an example of that: https://www.comsol.de/blogs/implementing-a-thermostat-with-the-events-interface/ Best wishes, Lars

Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Feb 24, 2020, 4:24 a.m. EST

This model

https://www.comsol.com/model/convective-heat-transfer-with-pseudo-periodicity-12057

Should give you an idea of how to do what you describe.

-------------------
Lars Gregersen
Comsol Denmark
This model https://www.comsol.com/model/convective-heat-transfer-with-pseudo-periodicity-12057 Should give you an idea of how to do what you describe.

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Feb 24, 2020, 11:06 a.m. EST

Thanks for your help. I learned new things from them but these two examples were dealing with different scenarios of mine: 1. for the thermostat there is an on/off point scenario 2. and the convective heat transfer with phseudo periodicty is related to different sections (I used this model before for two pipe in which I could , but for me it is not the boundry condition. it is various inlet temperatures (for a pipe) but the problem is the outlet temperature (heat outflow) of first step is going to be the inlet temperature for the second step.

I really appreciate your help.

Thanks for your help. I learned new things from them but these two examples were dealing with different scenarios of mine: 1. for the thermostat there is an on/off point scenario 2. and the convective heat transfer with phseudo periodicty is related to different sections (I used this model before for two pipe in which I could , but for me it is not the boundry condition. it is various inlet temperatures (for a pipe) but the problem is the outlet temperature (heat outflow) of first step is going to be the inlet temperature for the second step. I really appreciate your help.

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.