|
[Sponsors] |
UDF - Write data into file at the end of every time-step |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 13, 2017, 10:45 |
UDF - Write data into file at the end of every time-step
|
#1 |
New Member
Join Date: Apr 2017
Posts: 7
Rep Power: 9 |
Hello everyone,
I need to write a UDF to be executed with a transient simulation. I have specified the number of iterations to be carried out per time-step. I need to make a UDF that will write some data into a file at the end of each time-step. I don't want to see this at every iteration per time-step. Say, I specify 20 iterations per time-step. Then I want to have the data written at the end of 20th iteration or at the point where convergence is achieved for a time-step. Could someone tell me how can this be achieved? Thanks in advance! |
|
April 13, 2017, 11:28 |
|
#2 |
Member
Join Date: Sep 2016
Posts: 33
Rep Power: 10 |
The EXECUTE_AT_END macro is executed at the end of each time step of a transient model...so if you write into your file inside this macro it will contain only the values at the end of each time step.
|
|
April 13, 2017, 11:54 |
|
#3 |
New Member
Join Date: Apr 2017
Posts: 7
Rep Power: 9 |
||
April 13, 2017, 15:14 |
|
#4 |
New Member
Join Date: Apr 2017
Posts: 7
Rep Power: 9 |
Hi,
unfortunately, that did not work out. It is still printing values at every iteration per time-step. Could someone help me out on this? |
|
April 14, 2017, 04:53 |
|
#5 | |
New Member
Maksim
Join Date: Jan 2016
Posts: 24
Rep Power: 10 |
Quote:
In static analys it is called at the end of iteration Sent from my Lenovo K50-t5 using CFD Online Forum mobile app |
||
April 14, 2017, 09:05 |
|
#6 |
New Member
Join Date: Apr 2017
Posts: 7
Rep Power: 9 |
Hi Boh and qorka,
Thanks for the reply. So that means it has to do something with my code. I wrote a UDF to calculate the point of slowest blending in a mixing tank based on mass fraction of species. I tried running it on a Linux system with one node (16 cores) but I did not make it compatible for parallel processing. Am getting weird results. Have to go back and check where I made the mistake. |
|
April 14, 2017, 21:13 |
|
#7 |
New Member
钱权
Join Date: Mar 2017
Posts: 5
Rep Power: 9 |
||
April 17, 2017, 12:21 |
|
#8 |
New Member
Join Date: Apr 2017
Posts: 7
Rep Power: 9 |
..........................................
Last edited by rookiecfd; May 3, 2017 at 15:55. |
|
Tags |
file writing, time-step, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
Simulation of a single bubble with a VOF-method | Suzzn | CFX | 21 | January 29, 2018 01:58 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |