CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   user defined new material (http://www.cfd-online.com/Forums/fluent/90334-user-defined-new-material.html)

replytojk July 7, 2011 07:25

user defined new material
 
May somebody tell me how to define new user materials in Fluent material panel

Josyula July 7, 2011 09:37

Adding materials to FLUENT panel
 
Quote:

Originally Posted by replytojk (Post 315126)
May somebody tell me how to define new user materials in Fluent material panel

These are the steps to add new materials to FLUENT panel:-

1) Go to C:/Fluent.Inc (or where ever your Fluent files are installed)
2) Search for *.scm in that folder
3) You will get two folders like this: propdb.scm and thermodb.scm
4) Open the propdb.scm with wordpad
5) Copy any one of the material from list, like the one mentioned below:
(turpentine
fluid
(chemical-formula . c10h16)
(density (constant . 855))
(specific-heat (constant . 1800))
(thermal-conductivity (constant . 0.128))
(viscosity (constant . 0.001487))
(molecular-weight (constant . 136.1364))
)
6) Paste this just before the last parentheses i.e. after the 'particle-mixture-template' parentheses.
7) After pasting, you can change the numbers as desired and while naming the material, name them as new-xyz (where xyz is the name of your material).
8) Make sure that the parentheses are positioned properly.
9) Save the file and close it.
10) Restart the system.
11) Open Fluent, load the case & data file, then go to the Materials panel. In the list, check for new-xyz

This should give you the new material that you have added

replytojk July 9, 2011 00:38

Thankns , Josyula.
It is working

replytojk July 9, 2011 00:39

Thanks Josy !
It is working

replytojk July 9, 2011 02:53

Hi !
I have wriiten a code for water-nacl mixture and did the same as suggested by Josy. It appeared in Fluent database tab under mixtures material type. But I failed to copy it to case file i.e. to main material panel. It shows the following error

Error: CAR: invalid argument [1]: wrong type [not a pair]
Error Object: #f

The code written was

(WaterNaCl mixture
(Chemical formula . #f)
(density (constant . 997))
(viscosity (constant . 8.9e-4))
)


Kindly help to fix the problem

Josyula July 9, 2011 04:59

Quick observations on what you had written:-
a) Change 'Chemical' to 'chemical-formula'
b) Change '8.9e-4' to '8.9e-04'
These are trivial changes but they make a difference.
Try this and let me know.

Quote:

Originally Posted by replytojk (Post 315415)
Hi !
I have wriiten a code for water-nacl mixture and did the same as suggested by Josy. It appeared in Fluent database tab under mixtures material type. But I failed to copy it to case file i.e. to main material panel. It shows the following error

Error: CAR: invalid argument [1]: wrong type [not a pair]
Error Object: #f

The code written was

(WaterNaCl mixture
(Chemical formula . #f)
(density (constant . 997))
(viscosity (constant . 8.9e-4))
)


Kindly help to fix the problem


replytojk July 10, 2011 02:32

your suggestions are nice.
But still my problem is not solved.
Kindly suggest something

Josyula July 11, 2011 01:49

Send the propdb file
 
Hi,
Please send the propdb file in which you have written the new material properties.

I will try to read it in my system and see.

Additionally, have you activated the Mixture model?

Quote:

Originally Posted by replytojk (Post 315489)
your suggestions are nice.
But still my problem is not solved.
Kindly suggest something


replytojk July 11, 2011 10:34

here is propdb file attached
 
plz find the propdb file attached

Quote:

Originally Posted by Josyula (Post 315582)
Hi,
Please send the propdb file in which you have written the new material properties.

I will try to read it in my system and see.

Additionally, have you activated the Mixture model?


Josyula July 11, 2011 10:43

Where is the propdb file?
 
Hi,

I didn't get the file. Can you send it as an e-mail attachment?

Quote:

Originally Posted by replytojk (Post 315689)
plz find the propdb file attached


hamid1 March 4, 2013 05:14

Hi,
what do you mean by this:

Paste this just before the last parentheses

thanks

Josyula March 5, 2013 01:07

Quote:

Originally Posted by hamid1 (Post 411293)
Hi,
what do you mean by this:

Paste this just before the last parentheses

thanks

I meant that you have to paste your new material properties before the last parentheses of your propdb.scm file

mactech001 April 2, 2013 02:21

Dear Josyula,
i would like to define a temperature dependent material property that follows the equation:
y = -1.09ln(T) + 5.740, where T is temperature in Celsius. how do i define this please?

ahvz April 2, 2013 09:24

"define new materials with temperature dependent properties" for transient
 
hi,

how to define a new materials with temperature pendent properties into FLUENT ?

I need to define a materials with different temperature- enthalpy values...

regards,

Josyula April 3, 2013 01:02

Mactech001 and ahvz,

It is advisable to use 'DEFINE_PROPERTY' Macro for your respective problems and hook to the material which has the temperature dependent property in the 'Define-Materials'.
FLUENT Manual has an example for this Macro. Please check.
Regards,
Josyula

ahvz April 3, 2013 05:13

Hi,
thank you for reply,

how can I be sure that, if the UDF is true and working well or not? I bring the UDF file in the below

regards,


start the UDF:




/************************************************** *********************
udfexample.c
UDF for specifying transient temperature profile boundary condition
************************************************** **********************/

#include "udf.h"

DEFINE_PROFILE(Temp_Profile, thread, position)
{
face_t f;
real x[ND_ND]; /* this will hold the position vector */
real y;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[0];
F_PROFILE(f, thread, position) = (-1e-26*x*x*x*x*x*x)+(3e-21*x*x*x*x*x)-(3e-16*x*x*x*x)+(1e-11*x*x*x)-(2e-7*x*x)+((1/1000)*x)+13; /*this formula achieved from "curve fitting" */

}
end_f_loop(f,t)
}

Josyula April 3, 2013 13:33

ahvz,
Can you please repeat your question again? What is it that you would like to do?
The UDF which you have posted here is a DEFINE_PROFILE UDF where it is essentially applied to a boundary condition like inlet, walls, etc. of your geometry. Also, I suggest a small correction:-
The equation in the F_PROFILE should have 'y' and not 'x' because you have defined y = x[0] which is essentially 'x'.
If you can let me know your exact question, I try to help you.
Good day.

ahvz April 3, 2013 13:58

2 Attachment(s)
Dear Josyula,

thank you for reply,

I am trying to do transient analysis for my model. I used "curve fitting" method to achieve the temperature -time equation which is presented at below text.


you right. this is the temperature profile as a convective heat transfer through the model which I want to impose to the wall geometries.




/************************************************** *********************
udfexample.c
UDF for specifying transient temperature profile boundary condition
************************************************** **********************/

#include "udf.h"

DEFINE_PROFILE(Temp_Profile, thread, position)
{
face_t f;
real x[ND_ND]; /* this will hold the position vector */
real y;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[0];
F_PROFILE(f, thread, position) = (-1e-26*y*y*y*y*y*y)+(3e-21*y*y*y*y*y)-(3e-16*y*y*y*y)+(1e-11*y*y*y)-(2e-7*y*y)+((1/1000)*y)+13; /*this formula achieved from "curve fitting" */

}
end_f_loop(f,t)
}



how can I hock the file to the FLUENT (what about the type of this file). I already tried to do this steps to call the attached file (its placed at directory file of the model. capture.JPG. am I doing right?

regards,

Josyula April 5, 2013 09:54

ahvz,
Thank you for clarifying the question. From what I understand, you want to impose this at the walls. Right?
Compile the UDF. Then go to Boundary Conditions - 'Wall' - 'Convection' and choose 'User-Defined' not 'New Input Parameter' from the drop down list.
Let me know if it helps.
Further, please refer the FLUENT manual for help on hooking the UDF's.
Good day.

ahvz April 9, 2013 15:16

we are in the same page you right!
its work now!

thank you very much


All times are GMT -4. The time now is 09:44.