how to store UDF output for arbitrary/particular cell
Hello,
as part of my master thesis, I'm trying new drag models on a cold flow laboratory circulating fluidized bed. [Multiphase, Eulerian, transient] So far I have a written a UDF to calculate the drag coefficient ["DEFINE_EXCHANGE_PROPERTY()"]. I want to store the drag coefficient, calculated by the UDF, for an arbitrary or a particular cell at the end of each Iteration or timestep. What I've tried so far: 1. Code:
if(cell == 1000){ (I tried to find a particular cell by defining a monitoring point and then in report definition > Facet Average > Cell Info > Cell Id > mixture retrieved the cell Id for this point. But I'm not sure if I can use it in UDF to address this particular cell) The problem is that first I'm simulating on a cluster with 24 processors, so have many duplicates. Second, these lines are printed in between of residual reports after each iteration in the journal file. After 10,000 x 30=Iterations, the journal file is HUGE and practically not readable... 2. Code:
FILE* f = fopen("file.txt", "a"); I've seen a suggestion that opening and writing with EXECUTE_ON_DEMAND and EXECUTE_AT_END will stop the simulation from slowing down. But I'm not sure how to write the code. If that's true, I'll be grateful, if someone could help me out. I'm pretty sure, defining monitoring point and using report definition won't work in my case...?Correct me if I'm wrong. Are UDMI, UDS or Schemes an option? |
use FILE* f = fopen("file.txt", "a"); before DEFINE_EXCHANGE_PROPERTY()
if you need additional help, show your code best regards |
All times are GMT -4. The time now is 09:13. |