CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

C runtime library internal header file Error

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

Like Tree1Likes
  • 1 Post By rohit.mukare7

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2009, 12:54
Default C runtime library internal header file Error
  #1
Member
 
Join Date: Mar 2009
Posts: 43
Rep Power: 13
gholamghar is on a distinguished road
hello
i tried to build a udf library throught:define-user defined-functions-compiled
but i got this error when i tried to build:

fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory.

i copied stdio.h from "D:\Program Files\Microsoft Visual Studio 9.0\VC\crt\src" to "E:\Fluent.Inc\fluent6.3.21\src" then i built it again and it gave me this error:

fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory

i did the same and when i tried to build it again i got this one:

E:\Fluent.Inc\fluent6.3.21\src\crtdefs.h(36) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file.


any ideas what should i do to get rid of this error?
thanks
gholamghar is offline   Reply With Quote

Old   October 18, 2011, 11:38
Default
  #2
New Member
 
rohit mukare
Join Date: Aug 2011
Location: rourkela
Posts: 16
Rep Power: 11
rohit.mukare7 is on a distinguished road
hi i m also getting the same reply kindly let me knw if you have solved this problem..
Reza_hmd likes this.
rohit.mukare7 is offline   Reply With Quote

Old   May 12, 2019, 06:06
Default Same Error
  #3
New Member
 
Osman
Join Date: Jul 2018
Posts: 7
Rep Power: 4
usman nazir is on a distinguished road
If you people have solved the error kindly share how to did this?
usman nazir is offline   Reply With Quote

Old   May 13, 2019, 01:47
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,473
Rep Power: 21
AlexanderZ will become famous soon enough
https://www.cfd-online.com/Wiki/Flue...UDF.29_Related

best regards
AlexanderZ is offline   Reply With Quote

Old   May 14, 2019, 01:26
Default Same Error
  #5
New Member
 
Osman
Join Date: Jul 2018
Posts: 7
Rep Power: 4
usman nazir is on a distinguished road
I can only see the following page as shown in the link below with no information.
https://imgur.com/a/zdULh76
usman nazir is offline   Reply With Quote

Old   May 14, 2019, 01:30
Default
  #6
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,473
Rep Power: 21
AlexanderZ will become famous soon enough
https://www.cfd-online.com/Wiki/Fluent_FAQ

chapter 2.4

best regards
AlexanderZ is offline   Reply With Quote

Old   May 15, 2019, 04:18
Default Same Error
  #7
New Member
 
Osman
Join Date: Jul 2018
Posts: 7
Rep Power: 4
usman nazir is on a distinguished road
Sorry but this specific error is not mentioned on this link.
usman nazir is offline   Reply With Quote

Old   May 15, 2019, 04:30
Default
  #8
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,473
Rep Power: 21
AlexanderZ will become famous soon enough
Quote:
Originally Posted by usman nazir View Post
Sorry but this specific error is not mentioned on this link.
you have problems with visual studio, install it properly and set environment variables

best regards
AlexanderZ is offline   Reply With Quote

Old   September 5, 2019, 03:24
Default Similar error
  #9
New Member
 
Join Date: Aug 2019
Posts: 4
Rep Power: 3
Stac93 is on a distinguished road
hi guys,

i have a similar error and couldn't fix it with the steps mentioned before. I use Fluent 19 and VS 2015. i opened fluent via the prompt command and set the working directory to the case and data files. When i try to compile the udf i get the following error:

Copied D:\Christoph\Test 40 udf\zahn_files\dp0\FFF\Fluent/D:\Christoph\Test 40 udf\zahn_files\dp0\FFF\Fluent\Density_Viscosity_ud f.c to libudf1\src Creating user_nt.udf file for 3d_host ...
(system "copy "C:\Programme\ansys inc\v190\fluent"\fluent19.0.0\src\udf\makefile_nt. udf "libudf1\win64\3d_host\makefile" ")
1 Datei(en) kopiert.
(chdir "libudf1")(chdir "win64\3d_host")# Generating ud_io1.h
Density_Viscosity_udf.c
C:\Programme\ansys inc\v190\fluent\fluent19.0.0\src\main\global.h(9): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "stdio.h": No such file or directory
Creating user_nt.udf file for 3d_node ...
(system "copy "C:\Programme\ansys inc\v190\fluent"\fluent19.0.0\src\udf\makefile_nt. udf "libudf1\win64\3d_node\makefile" ")
1 Datei(en) kopiert.
(chdir "libudf1")(chdir "win64\3d_node")# Generating ud_io1.h
Density_Viscosity_udf.c
C:\Programme\ansys inc\v190\fluent\fluent19.0.0\src\main\global.h(9): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "stdio.h": No such file or directory

Done.

"Datei (Include) kann nicht ge”ffnet werden" means translated: File(Include) cann't be opened(Sorry for the german).
I cann't find the files stdio.h and i am desperate finding a solution.

i appreciate any kind of help
Thanks
Stac93 is offline   Reply With Quote

Old   September 5, 2019, 07:32
Default
  #10
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,473
Rep Power: 21
AlexanderZ will become famous soon enough
Code:
#include <stdio.h>
best regards
AlexanderZ is offline   Reply With Quote

Old   September 5, 2019, 07:43
Default
  #11
New Member
 
Join Date: Aug 2019
Posts: 4
Rep Power: 3
Stac93 is on a distinguished road
thanks for replying,
do you mean to include this in my code?
like this


/************************************************** *******************
UDF that simulates solidification by specifying a temperature-
dependent viscosity property
************************************************** ********************/
#include "udf.h"
#include "stdio.h"


DEFINE_PROPERTY(HLP46_density, c, t)
{
real rho;

real temp = C_T(c,t);
real pska, A0, A1, B, C, CP0, D, E1, E2, EO, G, RhoO, Toff;
real p = C_P(c,t);

pska = 10 / ((p / 100000)); /*[kg m^-1 s^-2])/(1 [kg m^-1 s^-2])*/
Toff = temp-273.15;
A0 = 0.640157 * 100;
A1 = 0.443242 * 10000; /*[K^-1]*/
B = 0.171801 * 10000;
C = 0.215003;
CP0 = 10000*(A0+A1*temp); /**[J kg^-1 K^-1]**/
D = -0.618199; /** [kg m^-3] **/
E1 = 0.115299 * 10000;
E2 = -0.134291 * 10000;
EO = 0.269774; /** [kg m^-3] **/
G = 0.001; /** [Pa s] **/
RhoO = 0.886860 * 1000; /**[kg m^-3] *10^3**/

rho = Toff*(EO*(1-(exp(-pska/E1)+E2*pska))+D)+RhoO/(1-C*log10((B+pska)/B));
return rho;
}
DEFINE_PROPERTY(cell_viscosity,c,t)
{
real mu_lam, Toff, G, a0, a1, a2, a3, a4, a5, a6, a7, a8, pska;
real T = C_T(c,t);
real p = C_P(c,t);

Toff = T - 273.15 ;/*(1[K])-1*/
G = 0.001;
a0 = 0.716789 * 1000;
a1 = 0.116482 * 1000;
a2 = 0.361897 * 10;
a3 = 0.822870 / 100;
a4 = -0.311457 * 100000;
a5 = 0.570805 * 1000;
a6 = -0.228366;
a7 = -0.562193 / 100;
a8 = 0.300900 / 100000;
pska = 1 / ((p / 100000));
mu_lam = G * exp((a0 - a2 * Toff) / (a1 + Toff)) * exp(((a3 + a4 * pska) * exp(-Toff / (a5 + a6 * pska)) + (a7 + a8 * pska)) * pska);

return mu_lam;
}


because i still have the same error
Stac93 is offline   Reply With Quote

Old   September 5, 2019, 21:31
Default
  #12
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,473
Rep Power: 21
AlexanderZ will become famous soon enough
I'm not sure about direct solution.
stdio.h is C library, which shold be installed with visual studio

in your case you can just remove
Code:
#include "stdio.h"
Ive compiled this code successfully

best regards
AlexanderZ is offline   Reply With Quote

Old   September 9, 2019, 05:13
Default
  #13
New Member
 
Join Date: Aug 2019
Posts: 4
Rep Power: 3
Stac93 is on a distinguished road
Thanks for your help.

I updated the windows 10 sdk library vor VS and then the code could compile successfully.
i initialized my case with a pressure from 100000Pa and then i applied the density udf in my material settings. Then the following message occured:

999999: mpt_accept: error: accept failed: Invalid argument

999999: mpt_accept: error: accept failedMPI Application rank 0 exited before MPI_Finalize() with status 2


The fl process could not be started.


I tried to look for a solution but i couldn't solve this yet. Has anyone an idea how to solve this error?
Best regards

Stac93 is offline   Reply With Quote

Old   September 9, 2019, 16:33
Default
  #14
Senior Member
 
Join Date: Nov 2013
Posts: 1,535
Rep Power: 21
pakk will become famous soon enough
Print rho to the screen.

Your equation might return a negative value or an extremely high value, that gives problems to Fluent. If this is the case: you have a problem in your equations.
pakk is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Netgen] Installation of Netgen in SuSE Linux 92 edvardsenpriv OpenFOAM Meshing & Mesh Conversion 23 January 16, 2009 07:12
[OpenFOAM] ParaView 33 canbt open OpenFoam file hariya03 ParaView 7 September 25, 2008 18:33
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
Problems of Duns Codes! Martin J Main CFD Forum 8 August 15, 2003 00:19
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 07:51.