# Defining variable thermal boundary conditions

**URL:** <https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588>\
**Category:** Thermal\
**Created:** [May 12, 2016, 2:57pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588 "2016-05-12T14:57:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [May 12, 2016, 2:57pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/1 "2016-05-12T14:57:11Z")

</div>

Defining the thermal boundary conditions like temperature, surface heat flux, convective heat flux etc. varying with respect to either time,x,y, or z co-ordinates can be done either by using table upload or defining formula. Variation with respect to multiple entities can only be done using formula. Both cases are discussed step by step below:

## Table upload

An example below shows how to define a varying temperature over time via table upload.

1. Create a _.csv_ file having time and temperature values in first and second column separated by a delimiter _(compatible: comma, semicolon, tab, space)_ respectively. An example below shows a _.csv_ file data separated with comma delimited.

2. Using any transient thermal or uncoupled thermomechanical analysis case, create a new temperature boundary condition and click table upload button ( ![](https://www.simscale.com/forum/uploads/default/original/2X/a/a49cba58067874288301083f90b61c3383131f7a.png)) than click upload file ( ![](https://www.simscale.com/forum/uploads/default/original/2X/f/f2d0848a2c017929abf8dfd3c5b5a3203a68803e.png)). A **Upload CSV file** window will pop up as shown in the figure below. Click **Choose file** and select your file. Give it a name (optional). Select **Separator** (_Comma_ in our case). Next click **Upload file**.

3. Click ![simulation uploaded data](https://www.simscale.com/forum/uploads/default/original/2X/1/16dec8349eb0ed946f77b394b270d9b397ce0f7c.png "Show' button") button to see the uploaded data whose column should look well separated as shown in the figure below (if both column values are not separated than it means that the selected **Separator** (delimiter) wasn’t right at the time of upload e.g. using _Semicolon_ as separator for file having column separated with _Comma_).

4. Once the file is uploaded, you will return to boundary condition panel with the uploaded file as shown in the figure below.

- Highlighted in red are the columns for independent and dependent quantities (time and temperature in current case respectively). This is set to _1_ and _2_ respectively since our file contain time and temperature values in first and second column respectively.

- Highlighted in green is the **Interpolation** criteria which is set to _linear_ means the data will be interpolated linearly. One can also choose _logarithmic_ or _none_ if required.

- Highlighted in blue is the **Left-sided Extrapolation** criteria which is set to _linear_. In current case it would mean that any value of temperature for time values below _0.5_ second will be increased linearly to _300 K_.

- Highlighted in orange is the **Right-sided Extrapolation** criteria which is set to _constant_. In current case it would mean that any value of temperature for time values above _2_ seconds will remain constant following the last value i.e. _400 K_.

That’s it! your time dependent temperature is now defined. You can perform the same procedure if you want to define variation of your **Convective heat flux** , **Surface heat flux** or **Volume heat flux** based on either of the available quantities i.e. ![](https://www.simscale.com/forum/uploads/default/original/2X/9/9067f31150f5f791ef35bcf21599b1bb85f6f002.png)

_Example project can be seen [here](https://www.simscale.com/projects/ahmedhussain18/pcb_-_transient_thermal_analysis_1/)._

## Formula

You can also define a thermal boundary condition change over time, x, y, z co-ordinate by clicking formula button ( ![](https://www.simscale.com/forum/uploads/default/original/2X/6/6eeb6bdfe790d322c65da104e72173e2cf8ea965.png)). A picture below shows the variable surface heat flux over x, y, and time.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/8/85b612cfc042db44a56865062c0b35d40e06edd4.png)

_Example project can be seen [here](https://www.simscale.com/projects/ahmedhussain18/circular_welding_analysis)._

---

<div class="post-metadata">

**Author:** ![ggiraldo](https://www.simscale.com/forum/user_avatar/www.simscale.com/ggiraldo/32/5226_2.png) [@ggiraldo](https://www.simscale.com/forum/u/ggiraldo)\
**Post date:** [May 12, 2016, 8:43pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/2 "2016-05-12T20:43:38Z")

</div>

Just for curiosity, what if I have a position dependent temperature distribution, lets say defined by a table with columns:

```
X, Y, Z, TEMP

```

How can I apply that boundary condition?

---

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [May 13, 2016, 8:08am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/3 "2016-05-13T08:08:42Z")

</div>

Hey @ggiraldo!

With a table upload you can only define the change based on only a single dependency i.e. either x,y,z or time. In order to do it with multiple dependencies, you have to use formula. An example project for the formula in this post describes how to apply the surface heat flux with both position and time dependency. You can use something similar for temperature also.

Hope this helps. If you have any other question/s, feel free to ask.

Best,

- Ahmed

---

<div class="post-metadata">

**Author:** ![tbruneton](https://www.simscale.com/forum/letter_avatar/tbruneton/32/5_5575768a8748004e209b776fc1b2916d.png) [@tbruneton](https://www.simscale.com/forum/u/tbruneton)\
**Post date:** [April 25, 2017, 10:55am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/4 "2017-04-25T10:55:52Z")

</div>

Hi,

I am trying to set up a time dependant pressure load with a csv table just as you described but it’s not working. I get a “An error occured” message as soon as I launched the simulation:

 ![](https://www.simscale.com/forum/uploads/default/original/2X/b/b0524e5e7f1022e11ea09ef04858691496d24ae7.png)

What can I do ?

Thanks !!

Théophile

---

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [April 25, 2017, 12:30pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/5 "2017-04-25T12:30:26Z")

</div>

Hi @tbruneton!

Seems like I can’t see your project. If it’s not public, please share it with our support mentioning your problem and I will try to get back to you with a solution there.

Best,  
Ahmed

---

<div class="post-metadata">

**Author:** ![tbruneton](https://www.simscale.com/forum/letter_avatar/tbruneton/32/5_5575768a8748004e209b776fc1b2916d.png) [@tbruneton](https://www.simscale.com/forum/u/tbruneton)\
**Post date:** [April 25, 2017, 1:33pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/6 "2017-04-25T13:33:57Z")

</div>

Hi @ahmedhussain18 !

Thanks for the quick reply ! I moved my project to public projects so that you can see it !  
Thanks for your time !

Theo

---

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [April 25, 2017, 2:11pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/7 "2017-04-25T14:11:18Z")

</div>

Hi Theo (@tbruneton)!

Do you intend to apply a negative pressure? This will squeeze your model. If that is right than I will further investigate the case.

Best,  
Ahmed

---

<div class="post-metadata">

**Author:** ![tbruneton](https://www.simscale.com/forum/letter_avatar/tbruneton/32/5_5575768a8748004e209b776fc1b2916d.png) [@tbruneton](https://www.simscale.com/forum/u/tbruneton)\
**Post date:** [April 25, 2017, 3:21pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/8 "2017-04-25T15:21:00Z")

</div>

Hi @ahmedhussain18 ,  
Yes exactly, I am trying to see if I can squeeze my model back and forth by pumping from the inside (hence the negative pressure). I was able to apply a negative constant pressure on the inside surface but when I am trying to do the same with a time dependant pressure load, I have an error…  
If you could tell me what to do to make it work, that would be great !

Thanks a lot!

Théophile

---

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [April 26, 2017, 7:57am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/9 "2017-04-26T07:57:57Z")

</div>

Hi Théophile (@tbruneton)

I investigated your case. There seems to be a problem in your uploaded file. I copied your file data and created my own and it worked. Please have a look here: [Polymer egg displacement - SimScale](https://www.simscale.com/projects/ahmedhussain18/polymer_egg_displacement/)

[https://www.simscale.com/forum/uploads/default/original/3X/5/8/58b4b381c69a52dc424a223451d6bdc0954087a9.mp4](https://www.simscale.com/forum/uploads/default/original/3X/5/8/58b4b381c69a52dc424a223451d6bdc0954087a9.mp4)

Note also that I have used advanced solver rather than normal and nonlinearity being turned on. Though I think the pressure is not that high enough to incorporate geometric nonlinearity. But of course you can now this simulation setup and increase the pressure to make it fully nonlinear.

In case of any question/s, feel free to ask.

Best,  
Ahmed

---

<div class="post-metadata">

**Author:** ![tbruneton](https://www.simscale.com/forum/letter_avatar/tbruneton/32/5_5575768a8748004e209b776fc1b2916d.png) [@tbruneton](https://www.simscale.com/forum/u/tbruneton)\
**Post date:** [April 26, 2017, 9:29am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/10 "2017-04-26T09:29:34Z")

</div>

Hey @ahmedhussain18,  
Thanks for the help! It was exactly what I was trying to do. However I don’t understand why my project is not working : our projects are exactly the same and mine is still not working…  
Can you send me your csv file so that I can check if mine is different ?  
Have you remeshed the model from the CAD file in my project or did you directly use the mesh I builded in my project ?  
Thanks

Théophile

---

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [April 26, 2017, 9:34am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/11 "2017-04-26T09:34:23Z")

</div>

Hi Théophile (@tbruneton)

> [@tbruneton](#):
>
> Can you send me your csv file so that I can check if mine is different ?

Please find the CSV files [here](https://drive.google.com/drive/folders/0B6trw_ZnduQqQWxTeVRXUjNpTW8?usp=sharing).

I have tried both with comma and semicolon delimiter, and both worked for me.

> [@tbruneton](#):
>
> Have you remeshed the model from the CAD file in my project or did you directly use the mesh I builded in my project ?

I directly used your mesh.

Best,  
Ahmed

---

<div class="post-metadata">

**Author:** ![tbruneton](https://www.simscale.com/forum/letter_avatar/tbruneton/32/5_5575768a8748004e209b776fc1b2916d.png) [@tbruneton](https://www.simscale.com/forum/u/tbruneton)\
**Post date:** [April 26, 2017, 9:43am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/12 "2017-04-26T09:43:48Z")

</div>

Thanks @ahmedhussain18,  
I’ll try with your files.  
Thing is even when I try to put a constant pressure value (-250000 for example) , I get an error message.  
I don’t understand why…

Best,

Théophile

---

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [April 26, 2017, 10:10am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/13 "2017-04-26T10:10:43Z")

</div>

Hi Théophile (@tbruneton)

I had a quick look on your project, seems to be working! right?

Best,  
Ahmed

---

<div class="post-metadata">

**Author:** ![tbruneton](https://www.simscale.com/forum/letter_avatar/tbruneton/32/5_5575768a8748004e209b776fc1b2916d.png) [@tbruneton](https://www.simscale.com/forum/u/tbruneton)\
**Post date:** [April 26, 2017, 10:59am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/14 "2017-04-26T10:59:46Z")

</div>

With a constant load, on my public project, it is. But not on my private project (which should be and really is the same !)

---

<div class="post-metadata">

**Author:** ![tbruneton](https://www.simscale.com/forum/letter_avatar/tbruneton/32/5_5575768a8748004e209b776fc1b2916d.png) [@tbruneton](https://www.simscale.com/forum/u/tbruneton)\
**Post date:** [April 26, 2017, 11:05am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/15 "2017-04-26T11:05:00Z")

</div>

Now it’s working with the cvs file (the simulation is completed) but in the solution fields I don’t have any time step or frame. Do you know why ?? This is driving me crazy

Thanks @ahmedhussain18

---

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [April 26, 2017, 11:51am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/16 "2017-04-26T11:51:27Z")

</div>

Yes I also noticed that the non advanced solver is not going with pseudo timesteps. Right now not sure her why but that was also the reason why I switched to advanced. I will prefer to remain with advanced solver in this case.

Best,  
Ahmed

---

<div class="post-metadata">

**Author:** ![tbruneton](https://www.simscale.com/forum/letter_avatar/tbruneton/32/5_5575768a8748004e209b776fc1b2916d.png) [@tbruneton](https://www.simscale.com/forum/u/tbruneton)\
**Post date:** [April 27, 2017, 8:34am UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/17 "2017-04-27T08:34:44Z")

</div>

But I am running advanced solver and I still have the same issue!  
Can you check my project please ?  
It would be super helpful !

Thanks,

Théo

---

<div class="post-metadata">

**Author:** ![ahmedhussain18](https://www.simscale.com/forum/user_avatar/www.simscale.com/ahmedhussain18/32/140_2.png) [@ahmedhussain18](https://www.simscale.com/forum/u/ahmedhussain18)\
**Post date:** [April 27, 2017, 12:46pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/18 "2017-04-27T12:46:51Z")

</div>

Hi Théo,

I had a look yesterday and the only change I found out was that you have turned on the **Line search** method in the **Numerics**. You don’t need it, Turning it off will make it run.

Best,  
Ahmed

---

<div class="post-metadata">

**Author:** ![rakshit24](https://www.simscale.com/forum/letter_avatar/rakshit24/32/5_5575768a8748004e209b776fc1b2916d.png) [@rakshit24](https://www.simscale.com/forum/u/rakshit24)\
**Post date:** [June 27, 2017, 3:35pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/19 "2017-06-27T15:35:52Z")

</div>

Hello Ahmed  
I was just trying to upload a temperature -time dependent CSV file, during which a sort of error got popped in which I got stuck can you help me out of this.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/9/9fbe4a51629509b84a10d7e70fd169bbeabd4382.png)

and the project link :- [https://www.simscale.com/workbench/?pid=221021337997005379#tab\_1-0](https://www.simscale.com/workbench/?pid=221021337997005379#tab_1-0)

---

<div class="post-metadata">

**Author:** ![rszoeke](https://www.simscale.com/forum/user_avatar/www.simscale.com/rszoeke/32/14_2.png) [@rszoeke](https://www.simscale.com/forum/u/rszoeke)\
**Post date:** [June 27, 2017, 8:17pm UTC](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588/20 "2017-06-27T20:17:02Z")

</div>

Hi @rakshit24,  
I guess you are running a steady-state analysis - there is no time, thus time is not allowed as a parameter for a formula or tabulated value.

Best,  
Richard

[Next page](https://www.simscale.com/forum/t/defining-variable-thermal-boundary-conditions/22588.md?page=2)
