USER_FORTRAN call variable at past timestep
Hi,
I implemented already an Additional Variable under the form of a Transport equation. I didnīt get good results and I would like to have full control on the implemented transport equation. The problem is essentially the presence of the diffusive term in the equation provided by Ansys CFX (I donīt need it) and the presence of the volume fraction in the formulation of each term. For this reason I decided to implement a new variable linked to User_CEL. Inside the routine then, linearize the system and solve it iteratively. I would like to receive some information regarding the following aspect: 1) Transient term: d(variable)/dt Call the previous timestep value in the point using the getvar with where option = īTSTEP1ī Call the actual timestep value in the point using the getvar with where option = `latestī Is it ok? Thank you in advance, Filippo 
Getvar is internal and undocumented. I attended an extensive user fortran training some years ago. The trainer commented it only on one slide. Getvar requires more arguments than user_getvar (which is reduced version of getvar). There is a when argument, which can be set to TIME1 and in some cases to TIME2.

dear joey2007,
user_getvar with where option = īTime1ī should be used to call the values at the previous timestep. Is this what you mean in your reply? 
It is not user_getvar. Please read exactly what I wrote above. I do not have more info. As I stated it was some years ago that I was in Harwell. I guess you have to ask the service.
On the other hand I do not understand why it should not be possible to implement the transport equation via add. var.???? May be you post the transport equation that we can discuss. 
The problem of inner iteration when calling the subroutine
Hello every.I now encountered a difficult problem.
I want to Calculate for a transient simulation in cfx, and there is a angular velocity need to be defined in the rotational domain.The problem is that angular velocity omega need to be updated every timestep. The defined omega expression is in the form of function which can be called in cfx. The question is that the iteration of omega can not proceed correctly.My aim is to update the omega only once every timestep,but in actual calculation, the omega function is just called dozens per inner iteration.I eager to konw how to achieve my goal of updating omega correctly. Thanks in advance. guoxj 
Can you explain what you are doing?

Ok! I am simulating the starting behavior of a domain including Impeller, using a Fortran subroutine.The subroutine is used to update the angular velocity of the domain.And I calculate the angular velocity taking into account the torque generated by the blade parts and the inertia of the impeller, and this value is used by the cfx solver to set the angular velocity of the blade. The subroutine is used to calculate angular velocity of the rotational domain in the timestep n by using the value of previous time step.The problem is, when the calculation is proceeding,although the cycle is set to update angular velocity at the start of a new timestep, the subroutine is called many times per inner iteration,not once every timestep. That is angular velocity has been updated dozens of times within each iteration. I want to what is the reason of it? And how to solve this problem?
Looking forward to your reply! 
Guess it should be easy to capture this by some ifīs in the user fortran routine. BTW: Do not know what the admins say, however isnīt it preferable to open a new thread for new question?

Also, unless there's something more complex, there's no reason to use fortran for this.

Quote:

i got the answer from the customer support for a simple use of user cels.
within USER_CEL Routines you can ask for the time derivative with the Utility routine USER_GETVAR, if you define the operator 'Time Derivative'. See documentation about USER_GETVAR On CFX Expression Level you could use Variable.Time Derivative. 
So is it possible to get the actual angular velocity of a domain by a USER_GETVAR CALL? Do you have these two lines for me? In my case in doesn't work. Error message says it would only work for fieldvalues.
Many thanks in advance for you. Ben 
All times are GMT 4. The time now is 08:38. 