Custom Concrete material [SOLVED]

My question is regarding grasshopper component ‘CustomMaterial’. I want to create a custom concrete class with same strength as C45/55 but a modified density to match a specific geometry. However in the CustomMaterial component I do not get to insert the compressive strengths. I notice that a custom material created with this component appears under the category ‘General’ in the FEM model created with the script.
Could you help me to create this custom concrete class right?

The easies and quick way to modify properties of an object is using a simple python script component.

If you open a .struxml file format, the following code will look familiar as the material object follow what you see in the .struxml.

import System.Guid
import copy

newConcrete = copy.deepcopy(x)
newConcrete.Concrete.Mass = mass
newConcrete.Guid = System.Guid("{53635D15-5696-47F2-9084-B63C7A00F970}")

concreteMaterial.gh (52.5 KB)

Hi,

Could you let me know what the last line in the code does and where you get that GUID from? Also, this code seems to replace the original material in the library. Is there a way to save this new material as a custom made?

Thanks.

Sure @RJRJ !

Every material required a GUID (Global unique identifier) and I have generated one using an online tool. It is basically a random generated text.

If the material is being overwritten, try to specify a new name.

Example:

newConcrete.Name = “C40/50_mass=0”

concreteMaterial_Rev1.gh (52.6 KB)

Navigating through a FEM-Design object is pretty simple as it reflects the .struxml data structure.

Assuming you are using a material as input in x, you can do:
x.Concrete.Gamma to set the gamma values.

The intellisense should give you a preview of which properties you can set using the dot notation.

		<material guid="81b7ca1c-1b1a-4f4c-8ec0-cce7bbc8743d" last_change="2013-07-19T09:34:55.000" action="added" standard="EC" country="DK" name="C12/15">
			<concrete mass="2.54842" E_0="0" E_1="0" E_2="0" nu_0="0" nu_1="0" nu_2="0" alfa_0="0" alfa_1="0" alfa_2="0" G_0="0" G_1="0" G_2="0" Fck="12" Fck_cube="15" Fctk="1.1" Fctm="1.6" Ecm="27000" gammaC_0="1.5" gammaC_1="1.2" gammaCE="1.2" gammaS_0="1.15" gammaS_1="1.15" alfaCc="1" alfaCt="1" Fcd_0="0" Fcd_1="10" Fctd_0="0" Fctd_1="0.916666666666667" Ecd_0="0" Ecd_1="22500" Epsc2="0.002" Epscu2="0.0035" Epsc3="0.00175" Epscu3="0.0035" environment="0" creep="0" shrinkage="0" nu="0.2" alfa="0.00001">
				<plastic_analysis_data>
					<U elasto_plastic_behaviour="false" plastic_hardening="true" concrete_crushing="true" concrete_crushing_option="Prager" tension_strength="true" tension_stiffening="true" tension_stiffening_option="Hinton" tension_stiffening_param="0.5" reduced_compression_strength="true" reduced_compression_strength_option="Vecchio 1" reduced_compression_strength_param="0.55" reduced_transverse_shear_stiffnes="false" ultimate_strain="true"></U>
					<Sq elasto_plastic_behaviour="false" plastic_hardening="true" concrete_crushing="true" concrete_crushing_option="Prager" tension_strength="true" tension_stiffening="true" tension_stiffening_option="Hinton" tension_stiffening_param="0.5" reduced_compression_strength="true" reduced_compression_strength_option="Vecchio 1" reduced_compression_strength_param="0.55" reduced_transverse_shear_stiffnes="false" ultimate_strain="true"></Sq>
					<Sf elasto_plastic_behaviour="false" plastic_hardening="true" concrete_crushing="true" concrete_crushing_option="Prager" tension_strength="true" tension_stiffening="true" tension_stiffening_option="Hinton" tension_stiffening_param="0.5" reduced_compression_strength="true" reduced_compression_strength_option="Vecchio 1" reduced_compression_strength_param="0.55" reduced_transverse_shear_stiffnes="false" ultimate_strain="true"></Sf>
					<Sc elasto_plastic_behaviour="false" plastic_hardening="true" concrete_crushing="true" concrete_crushing_option="Prager" tension_strength="true" tension_stiffening="true" tension_stiffening_option="Hinton" tension_stiffening_param="0.5" reduced_compression_strength="true" reduced_compression_strength_option="Vecchio 1" reduced_compression_strength_param="0.55" reduced_transverse_shear_stiffnes="false" ultimate_strain="true"></Sc>
				</plastic_analysis_data>
			</concrete>
		</material>