CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Interpolating between tables with time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2016, 09:51
Default Interpolating between tables with time
  #1
Member
 
Join Date: Nov 2015
Posts: 57
Rep Power: 10
taillanm is on a distinguished road
Hello all,

I want to assign to a wall a boundary condition of temperature that changes with time.
I have two tables (containing X Y Z and temperature) corresponding to two steady state results.
How would my field function look like to interpolate with my time step between those two tables and assign this as my boundary condition?

Thanks
taillanm is offline   Reply With Quote

Old   June 17, 2016, 14:35
Default
  #2
New Member
 
Kevin
Join Date: Oct 2012
Posts: 29
Rep Power: 13
kirrer is on a distinguished road
You can create two field functions using the interpolatePositionFunction() function. This will create a spatially resolved function of data at time=t1 and another function at time=t2. Then, create a third field function which does your interpolation, as you see fit, between the two starting functions. One example is phi(t)=phi(t1)+ (phi(t2)-phi(t1))/(t2-t1)*(t-t1). It doesn't look so pretty in text, but I'm sure you get the gist and/or have done linear interpolation before. You can use different interpolation schemes if you wish - quadratic, etc - as fancy as you want to be.

This gets much more difficult if you use three or more tables for different levels in time. Then you can either use multiple functions and select between them based on time (decent until you get to 4-6 tables) - after that, I don't have a good suggestion. But since you mention only two tables, the first method should be fine.
kirrer is offline   Reply With Quote

Old   June 18, 2016, 03:40
Default
  #3
Member
 
Join Date: Nov 2015
Posts: 57
Rep Power: 10
taillanm is on a distinguished road
Hi,

Thanks for your answer. Indeed I did what you suggested, I only mentionned two tables because I supposed it would be the same for n tables.
I give conditions such as:
(Time < 2 sec) ? formula for table 1 & 2 :
(Time < 4 sec) ? formula for table 3 & 2 :
and so on.

Max
taillanm is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 09:08
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56


All times are GMT -4. The time now is 09:05.