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

assign transient random data to inlet face

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2013, 19:04
Default
  #21
Member
 
^^
Join Date: Aug 2011
Posts: 70
Rep Power: 14
colopolo is on a distinguished road
Quote:
Originally Posted by blackmask View Post
Add
Code:
#include <math.h>
after
Code:
#include <stdio.h>
I am still getting the same error (still library error).
In your system, If you didn't get any error, please kindly inform me your system environment sush as, os, version of visual studio, sdk etc..

it may relate platform problem? my system is win64.
colopolo is offline   Reply With Quote

Old   July 24, 2013, 20:08
Default
  #22
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 21
blackmask will become famous soon enough
No, it is not a platform problem. The reason is that
Code:
lround
is not implemented in MSVC's math.h file.

Add the line
Code:
#define lround(x) (int)((x)+0.5)
after
Code:
#include "udf.h"
and try again.

Sorry for the inconvenience.
blackmask is offline   Reply With Quote

Old   July 24, 2013, 20:30
Default
  #23
Member
 
^^
Join Date: Aug 2011
Posts: 70
Rep Power: 14
colopolo is on a distinguished road
Quote:
Originally Posted by blackmask View Post
No, it is not a platform problem. The reason is that
Code:
lround
is not implemented in MSVC's math.h file.

Add the line
Code:
#define lround(x) (int)((x)+0.5)
after
Code:
#include "udf.h"
and try again.

Sorry for the inconvenience.
Great. Thanks Blackmask!!.
Finally I forward one step.

I defined velocity inlet as udf u_profile::libudf after load your code.
then I simply run it but the assigned velocity is zero at inlet surface.
colopolo is offline   Reply With Quote

Old   July 24, 2013, 20:49
Default
  #24
Member
 
^^
Join Date: Aug 2011
Posts: 70
Rep Power: 14
colopolo is on a distinguished road
Quote:
Originally Posted by blackmask View Post
No, it is not a platform problem. The reason is that
Code:
lround
is not implemented in MSVC's math.h file.

Add the line
Code:
#define lround(x) (int)((x)+0.5)
after
Code:
#include "udf.h"
and try again.

Sorry for the inconvenience.
After loading code, I defiend velocity inlet as udf u_profile::libudf at boundary condition.
Then simply run it but assigned velocity is zero at the inlet surface.

um.....
colopolo is offline   Reply With Quote

Old   July 24, 2013, 20:58
Default
  #25
Member
 
^^
Join Date: Aug 2011
Posts: 70
Rep Power: 14
colopolo is on a distinguished road
Attached file is a very simple test domain which has same coordinate of the input data.
could you check it if you have time?

Thanks in advance
Attached Files
File Type: zip Blackmask.zip (19.3 KB, 4 views)
colopolo is offline   Reply With Quote

Old   July 24, 2013, 22:13
Default
  #26
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 21
blackmask will become famous soon enough
You can not count everything on me. It is your job after all. The data file in the source code is "voutu.txt", as you mentioned in several posts before. The file name in the zip file is "voututen.dat". The input format specifier is
Code:
fscanf(fp, "%f,",...)
i.e., the data is separated by a comma, again, as you shown in some previous post. The data in the zip file is separated by space.

I am willing to help people and I understand that you want to make progress fast. But please spend sometime preparing yourself. It does not take long for you to understand the basics of c programming language.
blackmask is offline   Reply With Quote

Old   July 24, 2013, 23:02
Default
  #27
Member
 
^^
Join Date: Aug 2011
Posts: 70
Rep Power: 14
colopolo is on a distinguished road
Quote:
Originally Posted by blackmask View Post
You can not count everything on me. It is your job after all. The data file in the source code is "voutu.txt", as you mentioned in several posts before. The file name in the zip file is "voututen.dat". The input format specifier is
Code:
fscanf(fp, "%f,",...)
i.e., the data is separated by a comma, again, as you shown in some previous post. The data in the zip file is separated by space.

I am willing to help people and I understand that you want to make progress fast. But please spend sometime preparing yourself. It does not take long for you to understand the basics of c programming language.
sorry abou that. Meanwhile I modified a little bit and finally it works well!!
I reallly apprieciate your great support. Thanks.
I always thanks your help from the begining this thread.
I will let you know the result of test when i finish it.

Again, I am very thank you. God Bless YOU
colopolo is offline   Reply With Quote

Reply


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
Create an internal face aylalisa OpenFOAM Pre-Processing 1 June 19, 2013 12:02
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52
Inlet profile from 2D velocity and turbulence data Attesz OpenFOAM Pre-Processing 2 March 11, 2012 06:09
Map external data (heat flux in) on solid face jerry1977 CFX 2 January 31, 2012 13:32
Transient Inlet boundary condition - fully develop Omer CFX 3 November 28, 2006 16:22


All times are GMT -4. The time now is 01:02.