
[Sponsors] 
April 6, 2011, 09:37 

#21 
New Member
Matjaz Fleisinger
Join Date: Mar 2011
Posts: 17
Rep Power: 8 
While cfx solver is running, every time step.


April 6, 2011, 09:38 

#22 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 14 
If you are using User Fortran anyway, why are you bothering with using AV to accumulate the velocity? Do it all within Fortran.


April 6, 2011, 09:42 

#23 
New Member
Matjaz Fleisinger
Join Date: Mar 2011
Posts: 17
Rep Power: 8 
Probably i should, till now i haven't found suitable way to accumulate my past values, if i write them to a file, there are about 3000 entries written just for the first time step, then an error occurs, floating point: overflow or so....
Probably i should use MMS, but don't know how. 

April 6, 2011, 09:44 

#24 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 14 
Well, to test out the AV way of doing it, put in a fixed value for delta_velocity (on the order of your expected velocity) and see if velocity rises as it should.


April 6, 2011, 09:46 

#25 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 14 
Since you are using average velocity anyway, when writing it to a file, do the areaAve of velocity first, assign that to a variable, and write that value out.
From what you describe, it seems, there is no reason to keep the invidual velocities. 

April 6, 2011, 09:53 

#26 
New Member
Matjaz Fleisinger
Join Date: Mar 2011
Posts: 17
Rep Power: 8 
I will, thank you, it would be also interesting to see how much the fortran routine is sloving the simulation....


June 12, 2011, 05:23 
second time drivative

#27 
New Member
Join Date: Jun 2011
Posts: 6
Rep Power: 8 
Dear edmund
Hi,I`ll be grateful if u help me. How can I create second time derivative in CEL expressions? I need to use second derivative of temperature with respect to time in heat equation as a source term. Can i create additional variable of the before additional varible as u described? Regards 

June 13, 2011, 07:18 

#28 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 14 
On the surface I don't think this is possible, but really haven't given it much thought. Using 2nd order difference for the derivative, you need to store the 2 previous values. If it is possible you need to get pretty tricky with the oldest value needed.


June 17, 2011, 05:48 

#29 
Senior Member
Join Date: Jan 2010
Location: Germany
Posts: 268
Rep Power: 10 
Hello i just tried to use that option of TRANS_LOOP because i want to use and compare old Values of Mean Diameter with the new Ones but at the first Iteration it leads to failre : ERROR #001100279 has occurred in subroutine ErrAction. 
 Message:   Stopped in routine MEMERR 

June 17, 2011, 07:14 

#30 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 14 
Run a single iteration run with the AV set at a fixed number. Use that results file to initialize your new run, with the AV set back to what you want it to. I think that will fix your problem.
I think what is happening is your AV has no old value at the first iteration loop. Doing the above will allow it to have one and be called upon. 

June 17, 2011, 09:23 

#31 
Senior Member
Join Date: Jan 2010
Location: Germany
Posts: 268
Rep Power: 10 
i made that but still the same problem (i initialize the run with single step run). I am wondering if through the initialization with a finished run the add. variable would be automatically updated?


August 17, 2011, 05:28 
Second time derivative

#32 
New Member
Join Date: Jun 2011
Posts: 6
Rep Power: 8 
Dear Edmund,
I will be thankful if u help me, In continue of previous post for making second time derivative I faced a problem: To use previous value of first time derivative, I created a new variable with value of first time derivative(dT) and add update loop term to library of this new variable, but value of dTold is not value of previous step and it has a little difference with dT. It means added term to library of dT doesn't work, yes? But I could find previous value of temperature & account dT(first time derivative), with this method easily. How is solve order?& when this term will lose previous value? Last edited by marjan; August 30, 2011 at 08:33. Reason: find the solution 

September 13, 2011, 17:49 
Temporal pressure gradient

#33 
New Member
Join Date: Sep 2011
Posts: 8
Rep Power: 8 
Hi Edmund,
I am trying to use the AV approach you have described to get a temporal pressure gradient term at the outlet of my system. I have created an additional variable and applied the "Update Loop= TRANS_LOOP" in the command editor, however, my problem is how to link the AV ('Pprevious') to the Pressure field? In the default domain tab I selected my 'Pprevious' variable, and set an algebraic expression equal to the Pressure. Is this correct or am I missing something obvious? The simulation converges fine, but in postprocessor when I view the results, my AV has the same values as the pressure, i.e. there is no time delay. I tried the same approach with velocity and got the same result. Thanks in advance for your assistance 

September 14, 2011, 09:05 

#34 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 14 
You cant post process these. You need to monitor them.


September 14, 2011, 10:11 

#35 
New Member
Join Date: Sep 2011
Posts: 8
Rep Power: 8 
Hi Edmund, thanks for your reply.
Am I defining the AV correctly then? I am unclear about what you mean in terms of monitoring the AV. I'm sorry if this is a bit basic, but I am new to CFX Thanks 

September 14, 2011, 10:14 

#36 
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 512
Rep Power: 14 
I assume you are defining it correct.
You can only monitor while the solution is running using the output monitor. Once the solution completes the additional variable will lose its delay and take on the current value. 

September 14, 2011, 17:20 

#37 
New Member
Join Date: Sep 2011
Posts: 8
Rep Power: 8 
Edmund, you are a legend! Thanks for your help


September 28, 2011, 05:27 

#38  
New Member
Join Date: Jun 2011
Posts: 6
Rep Power: 8 
Quote:
I truly appreciate your kind,according your guess it was not possible until now I hope u could help me more, At first I used Update Loop for temperature and I got old value of this value and then created an expression for first time derivative(dT),now it seems UPDATE LOOP for this expression doesn't work because dTolddT always is zero!! What do u think about this problem? regards 

September 28, 2011, 06:26 

#39 
New Member
Join Date: Sep 2011
Posts: 8
Rep Power: 8 
Marjan,
Perhaps you already know this, but how are you monitoring this value? At the end of each internal loop, the value of dTold will be effectively discarded. If you set up a monitor in pre (Output control > Monitor > Monitor points and expressions) you should be able to see in solver that dTold takes the value of dT from the previous internal loop and remains constant until convergence has been reached for that time step (while dT will be changing). However, as it seems that the value of dTold is not stored (and thus any calculations based on it) between time steps, I cannot see how a second derivative in time would be achieved. 

October 13, 2011, 04:48 

#40 
New Member
Join Date: Jun 2011
Posts: 6
Rep Power: 8 
Thanks dear Hemo,
you are right and I couldn't find any solution for this problem still, Do u know anyone has used user FORTRAN for getting second time derivative and has succeeded?or are there other ways for this problem? I will be so thankful if u could help me 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Cel expressions  RAMAN6089  CFX  13  December 1, 2009 00:17 
junction box routine and CEL function  bornspur  CFX  2  February 3, 2009 03:24 
Cel expressions for trasient problem  Jervds  CFX  0  March 4, 2008 11:03 
Cel expressions Time dependent  Juan Maria Campos  CFX  8  December 27, 2007 19:16 
CEL Expressions  Nick  CFX  3  September 25, 2007 14:54 