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

User defined Material database in FLUENT

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

Like Tree4Likes
  • 3 Post By Hershey
  • 1 Post By Hershey

Reply
 
LinkBack Thread Tools Display Modes
Old   June 29, 2013, 02:04
Default User defined Material database in FLUENT
  #1
New Member
 
Ritesh
Join Date: Jun 2013
Location: India
Posts: 3
Rep Power: 4
riteshpalkar is on a distinguished road
Dear All,
I want to add new material in FLUENT database i.e. in User Defined Database, kindly give me informaion about how to create *.scm file for this purpose, it is mentioned that it can be created by Editor but i am unable to find this.
Please reply me if anyone have idea about this.

Thanks & Regards,
Ritesh
riteshpalkar is offline   Reply With Quote

Old   June 29, 2013, 13:18
Default
  #2
Member
 
Christopher Hershey
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 40
Rep Power: 5
Hershey is on a distinguished road
The User Defined Database is exactly what you mentioned a *.scm or rather a Scheme file loaded into fluent. An example given by Ansys is:

(air
fluid
(chemical-formula . #f)
(density (constant . 1.225)
(premixed-combustion 1.225 300))
(specific-heat (constant . 1006.43))
(thermal-conductivity (constant . 0.0242))
(viscosity (constant . 1.7894e-05)
(sutherland 1.7894e-05 273.11 110.56)
(power-law 1.7894e-05 273.11 0.666))
(molecular-weight (constant . 28.966))
)

This is found at http://aerojet.engr.ucdavis.edu/flue...ug/node321.htm

The above text is what you would copy and paste into a text editor and save with the .scm extension.

Once you save your material, then it can be loaded into fluent when you click on the User-Defined-Database link in the Materials window.

Notice that the material name "air" is first and the material type "fluid" is second. Each parameter described in the Scheme file will be loaded into the new material's properties.
crevoise, czhao86 and Mahdi23 like this.
Hershey is offline   Reply With Quote

Old   June 30, 2013, 02:44
Default
  #3
New Member
 
Ritesh
Join Date: Jun 2013
Location: India
Posts: 3
Rep Power: 4
riteshpalkar is on a distinguished road
Tanks Hershey,
for this suggestion, but i am not able to create file with .scm file, how it is to be created in which text editor.
riteshpalkar is offline   Reply With Quote

Old   June 30, 2013, 08:30
Default
  #4
Member
 
Christopher Hershey
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 40
Rep Power: 5
Hershey is on a distinguished road
Quote:
Originally Posted by riteshpalkar View Post
Tanks Hershey,
for this suggestion, but i am not able to create file with .scm file, how it is to be created in which text editor.
The most simple program to use would be Notepad in Windows. Open up a new Notepad file and paste the Scheme language that I posted earlier into the Notepad window. When you are done, click "File->Save As..." Then save the file with a name like "material.scm" without the quotes. Underneath the File name, there should be a "Save as type" box and it probably says "Text Documents (*.txt)". Click that and change it to "All Files (*.*)" so you do not save the *.txt extension to your *.scm file. Then click Save.

You will notice that the file you just saved does not have any associated programs that open it automatically, but Notepad can still read it and Fluent will definitely read it.
enghamada likes this.
Hershey is offline   Reply With Quote

Old   October 19, 2013, 04:06
Default
  #5
New Member
 
hamada
Join Date: Oct 2013
Posts: 1
Rep Power: 0
enghamada is on a distinguished road
I have the same problem. i used the mentioned method using notepad, but it is't correct.there any other method to create file.scm
enghamada is offline   Reply With Quote

Old   October 30, 2013, 10:40
Default
  #6
Member
 
Christopher Hershey
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 40
Rep Power: 5
Hershey is on a distinguished road
I am sorry, but I forgot a set of parentheses around the material that I specified above.

The correct way should be:

(
(air fluid
(chemical-formula . #f)
(density (constant . 1.225)
(premixed-combustion 1.225 300))
(specific-heat (constant . 1006.43))
(thermal-conductivity (constant . 0.0242))
(viscosity (constant . 1.7894e-05)
(sutherland 1.7894e-05 273.11 110.56)
(power-law 1.7894e-05 273.11 0.666))
(molecular-weight (constant . 28.966))
)
)

As for the scheme file, it is just an extension type. Use whichever editor you prefer. With something like notepad, simply saying "material.scm" will not do because usually the default file type is a ".txt". However, if you specify the save file type to "All Files "."" then you remove the automatic .txt appending to your save name. Then the ".scm" that you have in the file name will be used.

Alternatively, you may have a blank ".scm" file and load it into Fluent. Then you will have the option to copy materials (solid, fluid or mixture) that you specified in Fluent over to your scheme file. That makes it convenient if you ever need to recall the materials you used in previous simulations.

Please post with questions about this, but review how file types are saved. I have verified that the above method now works. However, I want to make sure that my instructions are clear.
Hershey is offline   Reply With Quote

Reply

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
Two questions on Fluent UDF Steven Fluent UDF and Scheme Programming 4 September 20, 2013 16:30
user defined turbulence model manuutin STAR-CD 5 October 14, 2009 05:29
UDF - Derivatives for User Defined Memory Variable Sandilya Garimella FLUENT 0 January 14, 2008 11:39
How to change the material database for Fluent sxf FLUENT 1 May 3, 2005 16:37
Creating new material properties in database rajeev FLUENT 1 July 13, 2001 03:06


All times are GMT -4. The time now is 16:15.