CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   User defined Material database in FLUENT (http://www.cfd-online.com/Forums/fluent/120039-user-defined-material-database-fluent.html)

riteshpalkar June 29, 2013 02:04

User defined Material database in FLUENT
 
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

Hershey June 29, 2013 13:18

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.

riteshpalkar June 30, 2013 02:44

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.

Hershey June 30, 2013 08:30

Quote:

Originally Posted by riteshpalkar (Post 436843)
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 October 19, 2013 04:06

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

Hershey October 30, 2013 10:40

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.


All times are GMT -4. The time now is 05:43.