Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to impose temperature dependent material properties? #357

Open
wd15 opened this issue Jan 10, 2025 · 5 comments
Open

How to impose temperature dependent material properties? #357

wd15 opened this issue Jan 10, 2025 · 5 comments

Comments

@wd15
Copy link
Contributor

wd15 commented Jan 10, 2025

Are temperature dependent material properties possible? If so, how does one write them in the .info file.

@Rombur
Copy link
Member

Rombur commented Jan 10, 2025

Yes, it is supported. You can either describe the property variation as a polynomial or as a table (I haven't used the table as much though). You need to set the property_format to table or polynomial.
Here is an example of the input using the polynomial format:

boost::property_tree::ptree database;
database.put("property_format", "polynomial");
database.put("n_materials", 2);
database.put("material_0.solid.density", "0., 1.");
database.put("material_0.solid.thermal_conductivity_x", "0., 1., 2.");
database.put("material_0.solid.thermal_conductivity_z", "0., 1., 2.");
database.put("material_1.solid.density", " 1., 2., 3.");
database.put("material_1.solid.thermal_conductivity_x",
"1., 100., 20., 200.");
database.put("material_1.solid.thermal_conductivity_z",
"1., 100., 20., 200.");
database.put("material_1.powder.density", "15., 2., 3.");
database.put("material_1.powder.thermal_conductivity_x", " 10., 18., 200.");
database.put("material_1.powder.thermal_conductivity_z", " 10., 18., 200.");

You give the coefficient for order 0, then 1, etc. You don't need to use the same order for all material properties.
Here is an example of the input using the table format:
database.put("property_format", "table");
database.put("n_materials", 2);
database.put("material_0.solid.density", "0., 1.");
database.put("material_0.solid.thermal_conductivity_x", "0., 10.; 10., 100.");
database.put("material_0.solid.thermal_conductivity_z", "0., 10.; 10., 100.");
database.put("material_1.solid.density", "0., 1.; 20., 2.; 30., 3.");
database.put("material_1.solid.thermal_conductivity_x",
"0., 10.; 10., 100.; 20., 200.");
database.put("material_1.solid.thermal_conductivity_z",
"0., 10.; 10., 100.; 20., 200.");
database.put("material_1.powder.density", "0., 1.; 15., 2.; 30., 3.");
database.put("material_1.powder.thermal_conductivity_x",
"0., 10.; 10., 100.; 18., 200.");
database.put("material_1.powder.thermal_conductivity_z",
"0., 10.; 10., 100.; 18., 200.");

You give the temperature and the value at this temperature. The temperature needs to be given in increasing value. We interpolate the value between the one you give us.

@wd15
Copy link
Contributor Author

wd15 commented Jan 11, 2025

Thanks for the response. The following gives an error.

materials
{
  n_materials 1
  property_format table
  
  material_0
  {
    solid
    {
      density 300.0, 7904; 2700.0, 7904
      specific_heat 300.0, 714; 2700.0, 714
      thermal_conductivity_x 300.0, 7.2; 2700.0, 42.0
      thermal_conductivity_y 300.0, 7.2; 2700.0, 42.0
      thermal_conductivity_z 300.0, 7.2; 2700.0, 42.0
    }

    powder
    {
      specific_heat 300.0, 714; 2700.0, 714
      density 300.0, 7904; 2700.0, 7904
      thermal_conductivity_x 300.0, 0.314; 2700.0, 0.314
      thermal_conductivity_y 300.0, 0.314; 2700.0, 0.314
      thermal_conductivity_z 300.0, 0.314; 2700.0, 0.314
    }

    liquid
    {
      specific_heat 300.0, 847; 2700, 847
      density 300.0, 7904; 2700.0, 7904
      thermal_conductivity_x 300.0, 37.3; 2700.0, 37.3
      thermal_conductivity_y 300.0, 37.3; 2700.0, 37.3
      thermal_conductivity_z 300.0, 37.3; 2700.0, 37.3
    }

    solidus 1675
    liquidus 1708
    latent_heat 295000
  }
}

The error is

Aborting.                                                               
Error: stod 

Have I messed up the formatting?

@Rombur
Copy link
Member

Rombur commented Jan 13, 2025

Boost's parser stops reading the line at the blank space, so it doesn't get the other values 🫤 . There is another problem though . The info parser stops reading at the semi-colon because it thinks it's a comment... I'll change the delimiter and update the tests. I am sorry you are hitting all these bugs.

@wd15
Copy link
Contributor Author

wd15 commented Jan 13, 2025

No worries. This is all part of making a great open source solution for AM.

@Rombur
Copy link
Member

Rombur commented Jan 13, 2025

I have opened #358. This should fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants