|
[Sponsors] |
October 24, 2023, 00:18 |
|
#81 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
This thread discusses many ways to do it.
You can use the <Variable>.Time Derivative method - this is preferred if it works for the variable you want. You can write a user fortran routine to do it. Then you can do anything, but user fortran requires a bit of work to learn to use. You can use the TRANS_LOOP approach. Most of this thread is on this approach, but note it is unsupported and does not seem to work for soem cases.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
October 24, 2023, 01:53 |
|
#82 |
New Member
zh
Join Date: Oct 2023
Posts: 13
Rep Power: 3 |
I followed the method in this literature but the expression for the last time step I don t know how to determine.
https://www.researchgate.net/publica...l_in_ANSYS-CFX |
|
October 24, 2023, 02:05 |
|
#83 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Doesn't that paper and lots of posts on this thread explain how to do it?
If you are having problems with getting it to work then you need to tell us what your problem is (like an error message).
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
October 24, 2023, 02:51 |
|
#84 |
New Member
zh
Join Date: Oct 2023
Posts: 13
Rep Power: 3 |
There seems to be no problem with the setting, the calculation has converged, but the results are not accurate, I calculated the data of three cardiac cycles.
This is my CEL. Beta = C*R2/Deta t Blood Density = 1050[kg/m^3] C = (1.7529*10^(-10))[m^3/Pa] Deta t = 0.02[s] Inlet Flow = Function Inlet Flow 3(t)*Blood Density Normal V = ((w)-(w.Time Derivative*dtstep)) P = (((R1+R2+R1*Beta)*QN+Beta*Previous Outlet Pressure \ -R1*Beta*Previous Outlet Flow )/(1+Beta)) P0 = 96.2327[mmHg] PN = areaAve(Pressure )@OUTLET Previous Flow = abs(areaInt(Normal Velocity )@OUTLET) Previous Pressure = (areaAve(Pressure )@OUTLET-(Pressure.Time \ Derivative*dtstep)) Q0 = 0.39[l/min] QN = abs(areaInt(w)@OUTLET) R1 = (2.4875*10^8)[Pa*s/m^3] R2 = (1.8697*10^9)[Pa*s/m^3] ADDITIONAL VARIABLE: Normal Velocity Option = Definition Tensor Type = SCALAR Units = [m/s ] Update Loop = TRANS_LOOP Variable Type = Specific END ADDITIONAL VARIABLE: Previous Outlet Flow Option = Definition Tensor Type = SCALAR Units = [ml/s] Update Loop = TRANS_LOOP Variable Type = Volumetric END ADDITIONAL VARIABLE: Previous Outlet Pressure Option = Definition Tensor Type = SCALAR Units = [mmHg ] Update Loop = TRANS_LOOP Variable Type = Specific END |
|
October 24, 2023, 03:23 |
|
#85 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
There is a LOT more to getting an accurate result than a bit of CCL. Did the calculations of the previous values you included work?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
October 24, 2023, 03:30 |
|
#86 |
New Member
zh
Join Date: Oct 2023
Posts: 13
Rep Power: 3 |
I use the data in the literature, but there is a big gap between my results and the literature, so I think there is still a problem with the expression of my export flow. I use the area score of the normal speed of the export, but this seems to have a certain error with the expression of CFX: massFlow() @OUTLET / Blood Density.
|
|
April 11, 2024, 06:19 |
|
#87 |
Senior Member
Jiri
Join Date: Mar 2014
Posts: 221
Rep Power: 13 |
Hello guys,
for some kind of reason, the approach based on creating the expression with .Time Derivative does not work. I tried Pressure.Time Derivative, Velocity u.Time Derivative, Temperature.Time Derivative... I always get the error message about unrecognised name. I save each time step. Is there needed any special setting in CFX Pre ? Do you have any idea please? |
|
April 11, 2024, 06:46 |
|
#88 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Can you attach the CCL of your simulation? You can export this from CFX-Pre.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
April 11, 2024, 06:58 |
|
#89 |
Senior Member
Jiri
Join Date: Mar 2014
Posts: 221
Rep Power: 13 |
Please, see the attachment..
|
|
April 11, 2024, 18:09 |
|
#90 | |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Quote:
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
||
April 12, 2024, 02:53 |
|
#91 |
Senior Member
Join Date: Feb 2011
Posts: 496
Rep Power: 18 |
||
April 12, 2024, 06:15 |
|
#92 |
Senior Member
Jiri
Join Date: Mar 2014
Posts: 221
Rep Power: 13 |
Yes, the version 2022 R2. However, version 2023 R2 does not work either (I opened the results in CFD Post). But I do not think it is matter of version as this did not work to me even a few years ago.
May that be some defaults, e.g. something dug in inside the expert parameters? |
|
April 12, 2024, 09:00 |
|
#93 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
That should work; however, the answer is conditional.
.Time Derivative ONLY works in the CFX-Pre/Solver environment. It does NOT work in CFD-Post unless the variable is already written by the solver. Then, where are you trying to use it? CFX-Pre, or CFD-Post.?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
April 15, 2024, 08:53 |
|
#94 |
Senior Member
Jiri
Join Date: Mar 2014
Posts: 221
Rep Power: 13 |
I am sorry for the late answer. I did it also in CFD Pre as expression:
Pressure.Time Derivative But when clicking on this in CFD Post, it says: The following unrecognised name was referenced: Pressure.Time Derivative. I tried also areaAve(Velocity u.Time Derivative)@rotating in CFX Pre, as the previous case is "variable", but there is still the same error in CFD Post. |
|
April 15, 2024, 13:26 |
|
#95 | |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Quote:
It seems you were able to finish the simulation using XXx.Time Derivative in your expressions, correct?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
||
April 15, 2024, 15:00 |
|
#96 |
Senior Member
Jiri
Join Date: Mar 2014
Posts: 221
Rep Power: 13 |
||
April 17, 2024, 12:49 |
|
#97 |
Senior Member
Jiri
Join Date: Mar 2014
Posts: 221
Rep Power: 13 |
Any ideas please? May I share the file with you to test it? Or vice versa, if some of you could share the cfx file where it works...
|
|
April 17, 2024, 14:05 |
|
#98 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
CFD-Post does not support those variables, XXX.Time Derivative UNLESS they ARE already in the results file.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
April 18, 2024, 05:02 |
|
#99 |
Senior Member
Jiri
Join Date: Mar 2014
Posts: 221
Rep Power: 13 |
Opaque, thank you for clarifying.
So, to sum it up again, how shall I understand it - I defined the variable "Pressure.Time Derivative" in Pre, then ran the solver and opened the result file in CFD Post. But for some reason this variable does not work in CFD Post. I understood that situation to be strange and that it should work. Or, please, did I miss some step in between? |
|
April 18, 2024, 06:49 |
|
#100 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Have you tried going to the CFX-Pre output tab and putting [variable].Time Derivative in the results file? It looks like by default they are not included in the results file.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
|
|
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 15:54 |