CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

extract velocity gradient <user_getvar> error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 14, 2016, 12:04
Default extract velocity gradient <user_getvar> error
  #1
New Member
 
Grecu Ionut Stelian
Join Date: Sep 2016
Posts: 15
Rep Power: 2
Ionut G is on a distinguished road
Hello all,

I need help regarding the command user_getvar.
I want to extract the velocity gradient using the command user_getvar.

I wrote a fortran code to compute the velocity in the boundary layer.
I compiled it using intel fortran compiler 14.0.3.202, it result 4 files including the .dll file which I need for ansys cfx but it gives me a warning, is it ok?
"ifort: command line warning #10161: unrecognized source type 'winnt-amd64\\stand
ard_wf.o'; object file assumed".

If I run the simulation with the files resulted by the compiler, the cfx solver stops returning with the following error:

Details of error:-
----------------
Error detected by routine MAKDIR
CDRNAM = VEL /GRADIENT
CRESLT = ILEG

Current Directory : /FLOW/ALGORITHM/ZN1/SYSTEM/VARIABLES

+--------------------------------------------------------------------+
| Writing crash recovery file |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| Stopped in routine MEMERR |

In the fortran code, I want extract the velocity gradient like this:
"CALL USER_GETVAR('Velocity.Gradient', CRESLT, pGRAD_V, CZ,DZ,IZ,LZ,RZ)"

I attach the fortran code(standard_wf), the messages from compiler(compiler results), and the output file from solver(ansys error)

Thanks in advance for support.
Attached Files
File Type: txt Compiler results.txt (2.2 KB, 8 views)
File Type: txt standard_wf.txt (4.3 KB, 7 views)
File Type: txt ansys error.txt (9.4 KB, 5 views)
Ionut G is offline   Reply With Quote

Old   December 14, 2016, 13:55
Default
  #2
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 9
cfdgremlin is on a distinguished road
I think you need to specify a velocity component, e.g.

CALL USER_GETVAR('Velocity u.Gradient', ................

CG
cfdgremlin is offline   Reply With Quote

Old   December 14, 2016, 16:50
Default
  #3
Senior Member
 
Join Date: Jun 2009
Posts: 620
Rep Power: 14
Opaque is on a distinguished road
I would try

'MyFluid.Velocity.Gradient'

as per the documentation

Quote:
You should always add the fluid name even though, in some cases such as for the variable Pressure, it is not strictly necessary. The fluid name is required when specifying a phase-specific variable (in a multiphase case) and when specifying an algebraic Additional Variable (even for a single-phase case).
Keep us posted..
Opaque is offline   Reply With Quote

Old   December 15, 2016, 10:02
Default
  #4
New Member
 
Grecu Ionut Stelian
Join Date: Sep 2016
Posts: 15
Rep Power: 2
Ionut G is on a distinguished road
Hello cfdgremlin, thanks for the quick reply.

I have tried your suggestion, but it didn't work I have the same error.
Ionut G is offline   Reply With Quote

Old   December 15, 2016, 10:10
Default
  #5
New Member
 
Grecu Ionut Stelian
Join Date: Sep 2016
Posts: 15
Rep Power: 2
Ionut G is on a distinguished road
Hello Opaque, thank you for the quick reply.

I called the user_getvar command like you recommended and the error it is gone.

Now I have another error (I did the simulation in both single precision and double precision):
+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction.
| Message: |
| Floating point exception: Invalid number |


+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction.
| Message: |
| Stopped in routine FPX: C_FPX_HANDLER
| |

Can you help me?
Attached Files
File Type: txt MRV Diffuser1 3D KE 500k SWF_002.txt (18.5 KB, 4 views)
Ionut G is offline   Reply With Quote

Old   December 15, 2016, 18:20
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 13,322
Rep Power: 103
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
This is a FAQ: https://www.cfd-online.com/Wiki/Ansy...do_about_it.3F

I would check that your simulation runs OK without the custom wall function.
ghorrocks is offline   Reply With Quote

Old   December 20, 2016, 05:01
Default
  #7
New Member
 
Grecu Ionut Stelian
Join Date: Sep 2016
Posts: 15
Rep Power: 2
Ionut G is on a distinguished road
Hello Glenn,

Thank you for reply, I followed the instructions from FAQ section and it seems that the errors is from the fortran code.
I will post here when I will have a working code.

Thank you all for the support.
Ionut G is offline   Reply With Quote

Old   January 16, 2017, 11:15
Default
  #8
New Member
 
Grecu Ionut Stelian
Join Date: Sep 2016
Posts: 15
Rep Power: 2
Ionut G is on a distinguished road
Hi,

After I searched a little more and after some conversations with Ansys Support, it seems that I can not replace the scalable wall function with a custom wall function.

I will move to Fluent, there I can implement a custom wall function.

Thank you all for the support.
Ionut G is offline   Reply With Quote

Reply

Tags
fortran compiler, user_getvar, velocity gradients

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile calcMassFlowC aurore OpenFOAM Programming & Development 12 March 18, 2014 05:22
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 07:25
checking the system setup and Qt version vivek070176 OpenFOAM Installation 22 June 1, 2010 12:34


All times are GMT -4. The time now is 00:42.