Closed nickjer closed 9 years ago
Dear Jeremy, The “Weld/Material properties/Create” Material Property Set dialog is Unit21.cpp. The user must choose from 6 Material Constitutive Relations (MCR): Isotropic Combined Hardening (linear) Combined Hardening (multi-lin) Elastic-Plastic-Creep (Iso multi-lin) Simple Phase Transformation Complete Phase Transformation
Each one has its own format of material file (e.g.) “iso650_new.dat”.
(i) On EMC2 machines we search for material files everywhere so we need a “Browse” capability. This is probably not true for OSC users. They will find all material files in your “MatDir” directory so we do not need the listbox at all? (i.e. just “OpenDialog”).
(ii) Since it is difficult for the user to ascertain what kind of MCR a material file contains, I think we should give them meaningful names: NNN_iso.dat NNN_chl.dat NNN_chm.dat NNN_epc.dat NNN_spt.dat NNN_cpt.dat We do not do this now. Most material files will be NNN_iso.dat, with very few of the others.
(iii) For simplicity we could just dump all material files into your “MatDir”, for the user to choose apropos. Or we could use some kind of OpenDialog1->Filter to identify (e.g.) “_iso.dat”. [I do not think OpenDialog does this (i.e. suffix only) so we might be back to the listbox again???]
(iv) There will never be a lot of material files, so dump all into one directory without filtering? What do you think? EdP
From: nickjer [mailto:notifications@github.com] Sent: Monday, October 05, 2015 10:17 AM To: AweSim-OSC/VFTsolid Subject: [VFTsolid] Auto-populate materials based on environment variable (#12)
Need to auto-populate the "Available materials" dialog box based on an environment variable:
[Image removed by sender. image]https://cloud.githubusercontent.com/assets/4260509/10282709/33391a0a-6b4a-11e5-9fc5-df6ca23d3a84.png
— Reply to this email directly or view it on GitHubhttps://github.com/AweSim-OSC/VFTsolid/issues/12.
Hi Ed,
Thanks for the info, I did find Unit21 and already modified it. I am just testing things before I push up any changes.
We could definitely filter the auto-populated list depending on the MCR, but we might want to make that change later if we find it necessary. For now I will just dump all the material files in a single directory and display them all to the user when they go to choose a material.
Also I notice you check if certain materials exist in the current working directory. Is this necessary?
if (index== 0){filename=L"mildsteel_iso";filepath=L"mildsteel_iso_file.dat";}
else if(index== 1){filename=L"reactorsteel_iso";filepath=L"reactorsteel_iso_file.dat";}
else if(index== 2){filename=L"inconel718_iso";filepath=L"inconel718_iso_file.dat";}
else if(index== 3){filename=L"monel_iso";filepath=L"monel_iso_file.dat";}
else if(index== 4){filename=L"aluminum_iso";filepath=L"aluminum_iso_file.dat";}
else if(index== 5){filename=L"alloy82_iso";filepath=L"alloy82_iso_file.dat";}
else if(index== 6){filename=L"alloy82_kin";filepath=L"alloy82_kin_file.dat";}
else if(index== 7){filename=L"alloy82_mln";filepath=L"alloy82_mln_file.dat";}
else if(index== 8){filename=L"alloy82_mix";filepath=L"alloy82_mix_file.dat";}
else if(index== 9){filename=L"alloy82_phs";filepath=L"alloy82_phs_file.dat";}
else if(index==10){filename=L"alloy82_fph";filepath=L"alloy82_fph_file.dat";}
This is fixed in b967a71aa01750e490d5e711dc1828cf434ed547
Hopefully I didn't break any of the features that the Windows users are used to.
It should be noted that I use the full path for the material file even if chosen through "Browse...". If this is not ok, I can look into solutions.
Dear Jeremy,
(i) Please think of this as experimental coding and throw it out if you wish. I was just trying to clearly organize material files for the user.
(ii) We are having nightmares supporting VFT/CTSP for two clients (both using MS_Win). One guy called me and asked “What kind of junk is VFT? I ran a model successfully yesterday but the same model crashes today. Give me a new executable.” It turns out that he was editing “input.in” files, not realizing that they are related to “param.in”. Also, instead of opening a DOS window and running by command line, he would just double-click on the executable and not see the actual error messages.
(iii) Another guy created a huge model against our advice, crashing the mergeCTSP code. [I had originally written a memory-efficient mergCTSP in C++ but someone at CATERPILLAR was more comfortable with a Fortran version, so I rewrote it in haste with a single huge array.] Best wishes, EdP
From: nickjer [mailto:notifications@github.com] Sent: Monday, October 05, 2015 11:44 AM To: AweSim-OSC/VFTsolid Cc: Ed Punch Subject: Re: [VFTsolid] Auto-populate materials based on environment variable (#12)
Hi Ed,
Thanks for the info, I did find Unit21 and already modified it. I am just testing things before I push up any changes.
We could definitely filter the auto-populated list depending on the MCR, but we might want to make that change later if we find it necessary. For now I will just dump all the material files in a single directory and display them all to the user when they go to choose a material.
Also I notice you check if certain materials exist in the current working directory. Is this necessary?
if (index== 0){filename=L"mildsteel_iso";filepath=L"mildsteel_iso_file.dat";}
else if(index== 1){filename=L"reactorsteel_iso";filepath=L"reactorsteel_iso_file.dat";}
else if(index== 2){filename=L"inconel718_iso";filepath=L"inconel718_iso_file.dat";}
else if(index== 3){filename=L"monel_iso";filepath=L"monel_iso_file.dat";}
else if(index== 4){filename=L"aluminum_iso";filepath=L"aluminum_iso_file.dat";}
else if(index== 5){filename=L"alloy82_iso";filepath=L"alloy82_iso_file.dat";}
else if(index== 6){filename=L"alloy82_kin";filepath=L"alloy82_kin_file.dat";}
else if(index== 7){filename=L"alloy82_mln";filepath=L"alloy82_mln_file.dat";}
else if(index== 8){filename=L"alloy82_mix";filepath=L"alloy82_mix_file.dat";}
else if(index== 9){filename=L"alloy82_phs";filepath=L"alloy82_phs_file.dat";}
else if(index==10){filename=L"alloy82_fph";filepath=L"alloy82_fph_file.dat";}
— Reply to this email directly or view it on GitHubhttps://github.com/AweSim-OSC/VFTsolid/issues/12#issuecomment-145575676.
Ah, I just don't want to branch off this VFTSolid from the one you currently use in production at Emc2. It is best if we all use the same VFTSolid. It becomes a nightmare to maintain two copies of the same code. So when I add new behavior for Linux, I also try to keep the behavior on Windows the same as much as possible.
Feel free to yell at me if I make any changes you don't approve of. For now I'll leave those hardcoded materials in there as your users seem to need all the help they can get.
Dear Jeremy, The material file name is used in two places in Unit1.cpp.
(i) Line 17143 (exportWARP3D1a_public) where it is added to listbox Form7 (“select material file for non-WPs”)
(ii) Line 18593 (exportWARP4_public) where it is output to *.wrp I am not sure that they can accept full path name. EdP
From: nickjer [mailto:notifications@github.com] Sent: Monday, October 05, 2015 12:21 PM To: AweSim-OSC/VFTsolid Cc: Ed Punch Subject: Re: [VFTsolid] Auto-populate materials based on environment variable (#12)
It should be noted that I use the full path for the material file even if chosen through "Browse...". If this is not ok, I can look into solutions.
— Reply to this email directly or view it on GitHubhttps://github.com/AweSim-OSC/VFTsolid/issues/12#issuecomment-145589463.
Thanks, I will look into it.
Thanks for the heads up on that Ed. Now I copy the material file into the user's working directory and ignore full paths.
Need to auto-populate the "Available materials" dialog box based on an environment variable: