|
[Sponsors] |
Compiling User Fortran with CFX 14.0 on Win64 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 12, 2016, 12:34 |
|
#21 | |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Quote:
My 2 cents, and hope it helps |
||
February 24, 2016, 05:02 |
|
#22 |
New Member
Emil Günther
Join Date: Nov 2015
Posts: 18
Rep Power: 11 |
Okay, Thanks!
Last edited by CFXNewbie; March 8, 2016 at 09:29. |
|
February 24, 2016, 06:06 |
|
#23 |
Member
Join Date: Jan 2016
Posts: 34
Rep Power: 10 |
I haven't read through your entire code but the fact that your routine is called several times within a single iteration isn't bad necessarily. Even if you run a serial computation some domains and boundaries are split in locales. I've had a similar experience and started outputting the amount of 'successful' actions of my subroutine and noticed it was never the same amount. In other words, as far as I understand, the entire domain is always split some form or another (irrespective of serial/parallel), so you'll always see multiple calls of your subroutine in a single iteration.
|
|
February 25, 2016, 10:42 |
|
#24 | |
New Member
Emil Günther
Join Date: Nov 2015
Posts: 18
Rep Power: 11 |
Quote:
The problem is: In the new model I'm using the subroutine instead of the cfx-pre-expressions (old model). Nothing else has changed. The new model needs more computing time compared with the old model. As my task is, to replace the expressions by a subroutine, i cannot go back and use expressions. Thats why I'm desperately looking for a possibility to save computing time.... |
||
February 26, 2016, 02:51 |
|
#25 |
Member
Join Date: Jan 2016
Posts: 34
Rep Power: 10 |
I'm far from an expert on this stuff. But my gut feeling says that Fortran should be as fast if not faster than CEL for simple equations. Have you considered checking things other than the subroutine, like your source coefficient. I've used a different source option (general momentum) and tweaking that coefficient can significantly speed up your simulation.
|
|
March 8, 2016, 13:46 |
|
#26 |
New Member
Emil Günther
Join Date: Nov 2015
Posts: 18
Rep Power: 11 |
thanks again for your answers so far!
i think im very close to a solution now my idea is, to find out the actual partition number and calculate the scalar only if Partition number is 1 in each Iteration loop. after having calculated it, i want to save it via Memory Manegement System (MMS) and read it from there, when partition number is different from 1. how can i save a value with MMS and read it from there? i've read chapter 18.6. from the solver modelling guide, but still have no idea how i can save and read values. Ive tried RZ(1)=P ...if Partition number is 1... ... ... P=RZ(1) ...else: Partition number not equal 1... but this didn't work. Thanks for your help!!! |
|
March 8, 2016, 14:57 |
|
#27 |
Member
Join Date: Jan 2016
Posts: 34
Rep Power: 10 |
The only experience I have with that is passing data to CFX via a junction box sub routine. I'm guessing you'd have to save this data in a pointer probably. I'm not sure how much work this might be, otherwise you could consider making a multi-body mesh and only apply it on the relevant body. It's the same thing, just much easier to accomplish.
|
|
March 8, 2016, 17:01 |
|
#28 | |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Quote:
It shows how to create a memory data area, store the value of interest, and later how to read it from another routine/function. Hope the above helps, |
||
March 9, 2016, 10:22 |
|
#29 |
New Member
Emil Günther
Join Date: Nov 2015
Posts: 18
Rep Power: 11 |
Thank you for your answer!
I've read through example 18.8.1, I'think it's close to my Problem. My idea is now: First calculate and store my value once in each Iteration Loop, using a Junction Box Routine with Location "Start of Coefficient Loop: Called at the start of each iteration loop. For a transient run, this relates to the inner Loop."
And then read it from stack with a CEL Routine, which is called as often as needed. My Problem now is: The junction box Routine is never executed and therefore the value the CEL Routine is reading from stack is allways Zero. Any ideas how i can get my Junction Box Routine working? Thank you! |
|
March 9, 2016, 12:45 |
|
#30 | |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
Did you activate the usage of the Junction Box Routine as outlined in the documentation ?
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Importing external DLL to Ansys CFX using user Fortran | snpradeep | CFX | 2 | May 16, 2014 04:52 |
How to set environmental variables of Intel Fortran +CFX? | Christine MO | CFX | 0 | September 23, 2011 12:11 |
CFX User Fortran: Multiple Outputs | pingub | CFX | 1 | October 26, 2010 15:49 |
error msg when compiling user fortran | Ollimarc | CFX | 0 | March 13, 2008 19:16 |
how to use USER FORTRAN with CFX | cfd_99 | Main CFD Forum | 1 | June 4, 1999 06:42 |