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

How to use date from previous time step in user defined field function?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 5, 2014, 14:32
Default How to use date from previous time step in user defined field function?
  #1
New Member
 
Samant
Join Date: Nov 2014
Posts: 1
Rep Power: 0
samantkumarnagraj is on a distinguished road
Hello everyone,

I am new to the software. I am carrying out a solidification simulation. I have defined a user defined field function for fraction solidified w.r.t. time as

df/dt=exp(${F(t)})*${G(T)}

Here,

F(t)=F(t-1)-(1.047*pow(${Growth_Rate},3)*${Nucleation_Rate}*po w(${TimeStep},4))

G(t)=G(t-1)+(4.188*pow(${growth_rate},3)*${Nucleation_Rate} *pow(${TimeStep},3))

My question is, how can I use the data from the previous time step in the current time step?

Please help me out!

Thanks in advance.
Regards,
Samant Nagraj
samantkumarnagraj is offline   Reply With Quote

Old   December 8, 2014, 05:55
Default
  #2
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 533
Rep Power: 20
JBeilke is on a distinguished road
Create a "Field mean Monitor" with "Time Step Frequency = 1" and "Sliding Sample Window Size = 1"

When you name the monitor "densityOld" you call it "$densityOldMonitor" in the FieldFunction.
JBeilke is offline   Reply With Quote

Old   December 12, 2014, 07:08
Default
  #3
New Member
 
Non-US/Non-Canadian
Join Date: Dec 2014
Posts: 1
Rep Power: 0
Pietro_ is on a distinguished road
Quote:
Originally Posted by JBeilke View Post
Create a "Field mean Monitor" with "Time Step Frequency = 1" and "Sliding Sample Window Size = 1"

When you name the monitor "densityOld" you call it "$densityOldMonitor" in the FieldFunction.
Actually I've learnt that in the version 9.06 the Sliding Sample Window Size should be 2, as a sliding windows of 1 give you the current value and not the previous one. You need to set the sliding windows to 2 and you will get the mean between the previous and the current value. So the expression to get previous time step value is:
2*${MeanValue(t-1)}-${YourValue(t)}
I hope it's clear
Pietro_ 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
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 14:40
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 23:40
Patches for OpenFOAM 1.7 on MacOS X gschaider OpenFOAM Installation 101 September 21, 2011 06:37
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 21:54.