Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ FemDesign.Tests/Results/**/*.log
/FemDesign.Examples/Python/jupyter-notebook/.ipynb_checkpoints
/FemDesign.Python/packaging/src
/FemDesign.Python/FEM-Design API
*.whl
*.gz
/FemDesign.Python/FEM_Design.egg-info
10 changes: 5 additions & 5 deletions FemDesign.Core/Bars/BarPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -533,23 +533,23 @@ public Eccentricity[] AnalyticalEccentricity

[XmlAttribute("ecc_crack")]
[DefaultValue(false)]
public bool EccCrack { get; set; }
public bool EccCrack { get; set; } = false;

[XmlAttribute("first_order_analysis_U")]
[DefaultValue(false)]
public bool FirstOrderAnalysisU { get; set; }
public bool FirstOrderAnalysisU { get; set; } = false;

[XmlAttribute("first_order_analysis_Sq")]
[DefaultValue(false)]
public bool FirstOrderAnalysisSq { get; set; }
public bool FirstOrderAnalysisSq { get; set; } = false;

[XmlAttribute("first_order_analysis_Sf")]
[DefaultValue(false)]
public bool FirstOrderAnalysisSf { get; set; }
public bool FirstOrderAnalysisSf { get; set; } = false;

[XmlAttribute("first_order_analysis_Sc")]
[DefaultValue(false)]
public bool FirstOrderAnalysisSc { get; set; }
public bool FirstOrderAnalysisSc { get; set; } = false;

/// <summary>
/// Parameterless constructor for serialization.
Expand Down
2 changes: 1 addition & 1 deletion FemDesign.Core/Calculate/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class Sort

[DefaultValue(0)]
[XmlElement("step")]
public double _step { get; set; }
public double _step { get; set; } = 0;

[XmlIgnore]
public double Step
Expand Down
2 changes: 1 addition & 1 deletion FemDesign.Core/FemDesign.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
<Compile Include="Stage\SFactorType.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\CaselessLoads.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\FD 23.00.001 Strusoft.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\FEM-Design 24.00.005.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\FEM-Design 25.00.001.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\Layer_type.cs" />
<Compile Include="StruSoft\Interop\StruXml\Data\Vehicle_lib_type.cs" />
<Compile Include="Releases\RigidityDataType0.cs" />
Expand Down
14 changes: 7 additions & 7 deletions FemDesign.Core/FemDesignConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace FemDesign
/// </summary>
public class FemDesignConnection : IDisposable
{
private readonly int fdVersion = 24;
private readonly int fdVersion = 25;
private readonly PipeConnection _connection;
private readonly Process _process;
public bool HasExited { get; private set; }
Expand Down Expand Up @@ -71,7 +71,7 @@ public class FemDesignConnection : IDisposable
/// <param name="tempOutputDir"><code>BE CAREFUL!</code>If true the <paramref name="outputDir"/> will be deleted on exit. This option has no effect unless <paramref name="outputDir"/> has been specified.</param>
/// <param name="verbosity"></param>
public FemDesignConnection(
string fdInstallationDir = @"C:\Program Files\StruSoft\FEM-Design 24\",
string fdInstallationDir = @"C:\Program Files\StruSoft\FEM-Design 25\",
bool minimized = false,
bool keepOpen = false,
string outputDir = null,
Expand Down Expand Up @@ -110,7 +110,7 @@ public FemDesignConnection(
}
catch
{
throw new Exception(@"fd3dstruct.exe has not been found. `C:\Program Files\StruSoft\FEM-Design 24\` does not exist!");
throw new Exception($"fd3dstruct.exe has not been found. {installDir} does not exist!");
}

_process.Exited += _processExited;
Expand Down Expand Up @@ -142,10 +142,10 @@ public string SetFemDesignDirectory(string fdInstallationDir)

var defaultDirs = new List<string>()
{
@"C:\Program Files\StruSoft\FEM-Design 24\",
@"C:\Program Files\StruSoft\FEM-Design 24 Educational\",
@"C:\Program Files\StruSoft\FEM-Design 24 Student\",
@"C:\Program Files\StruSoft\FEM-Design 24 Night Install\" // for StruSoft employees
@"C:\Program Files\StruSoft\FEM-Design 25\",
@"C:\Program Files\StruSoft\FEM-Design 25 Educational\",
@"C:\Program Files\StruSoft\FEM-Design 25 Student\",
@"C:\Program Files\StruSoft\FEM-Design 25 Night Install\" // for StruSoft employees
};

foreach (var dir in defaultDirs)
Expand Down
2 changes: 1 addition & 1 deletion FemDesign.Core/Foundations/ExtrudedSolid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public partial class ExtrudedSolid

[XmlAttribute("abobe")]
[DefaultValue(false)]
public bool Above { get; set; }
public bool Above { get; set; } = false;

[XmlElement("region")]
public FemDesign.Geometry.Region Region { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion FemDesign.Core/Foundations/IsolatedFoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public partial class IsolatedFoundation : NamedEntityBase, IStructureElement, IF

[XmlAttribute("analythical_system")]
[DefaultValue(FoundationSystem.Simple)]
public FoundationSystem FoundationSystem { get; set; }
public FoundationSystem FoundationSystem { get; set; } = FoundationSystem.Simple;

#region MATERIAL

Expand Down
18 changes: 9 additions & 9 deletions FemDesign.Core/Materials/Concrete.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://strusoft.com/

using StruSoft.Interop_24;
using StruSoft.Interop_25;
using System.Xml.Serialization;

namespace FemDesign.Materials
Expand All @@ -12,16 +12,16 @@ namespace FemDesign.Materials
public partial class Concrete: MaterialBase
{
[XmlElement("tda_creep")]
public StruSoft.Interop_24.Tda_creep2 CreepTimeDependant { get; set; }
public StruSoft.Interop_25.Tda_creep2 CreepTimeDependant { get; set; }

[XmlElement("tda_shrinkage")]
public StruSoft.Interop_24.Tda_shrinkage ShrinkageTimeDependant { get; set; }
public StruSoft.Interop_25.Tda_shrinkage ShrinkageTimeDependant { get; set; }

[XmlElement("tda_elasticity")]
public StruSoft.Interop_24.Tda_elasticity ElasticityTimeDependant { get; set; }
public StruSoft.Interop_25.Tda_elasticity ElasticityTimeDependant { get; set; }

[XmlElement("plastic_analysis_data")]
public StruSoft.Interop_24.Concrete_pl_data Plasticity { get; set; }
public StruSoft.Interop_25.Concrete_pl_data Plasticity { get; set; }

[XmlAttribute("Fck")]
public string Fck { get; set; } // material_base_value
Expand Down Expand Up @@ -101,7 +101,7 @@ internal void SetMaterialParameters(double creepUls, double creepSlq, double cre

internal void SetPlasticity(bool plastic = true, bool hardening = true, CrushingCriterion crushing = CrushingCriterion.Prager, bool tensionStrength = true, TensionStiffening tensionStiffening = TensionStiffening.Hinton, ReducedCompression reducedCompression = ReducedCompression.Vecchio1, bool reducedTransverse = false, bool ultimateStrainRebars = true )
{
var plasticity = new StruSoft.Interop_24.Concrete_pl_attribs();
var plasticity = new StruSoft.Interop_25.Concrete_pl_attribs();
plasticity.Elasto_plastic_behaviour = plastic;
plasticity.Plastic_hardening = hardening;

Expand All @@ -112,7 +112,7 @@ internal void SetPlasticity(bool plastic = true, bool hardening = true, Crushing
else
{
plasticity.Concrete_crushing = true;
plasticity.Concrete_crushing_option = (StruSoft.Interop_24.Cc_type)crushing;
plasticity.Concrete_crushing_option = (StruSoft.Interop_25.Cc_type)crushing;
}

plasticity.Tension_strength = tensionStrength;
Expand All @@ -124,7 +124,7 @@ internal void SetPlasticity(bool plastic = true, bool hardening = true, Crushing
else
{
plasticity.Tension_stiffening = true;
plasticity.Tension_stiffening_option = (StruSoft.Interop_24.Ts_type)tensionStiffening;
plasticity.Tension_stiffening_option = (StruSoft.Interop_25.Ts_type)tensionStiffening;

if(tensionStiffening == TensionStiffening.Hinton)
plasticity.Tension_stiffening_param = 0.5;
Expand All @@ -143,7 +143,7 @@ internal void SetPlasticity(bool plastic = true, bool hardening = true, Crushing
else
{
plasticity.Reduced_compression_strength = true;
plasticity.Reduced_compression_strength_option = (StruSoft.Interop_24.Rcsm_type) reducedCompression;
plasticity.Reduced_compression_strength_option = (StruSoft.Interop_25.Rcsm_type) reducedCompression;

if(reducedCompression == ReducedCompression.Cervera)
plasticity.Reduced_compression_strength_param = 0.550;
Expand Down
18 changes: 9 additions & 9 deletions FemDesign.Core/Materials/Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,16 @@ public static Material SetConcretePlasticity(this Material material, bool plasti
return newMaterial;
}

public static Material SetCreep(this Material material, int to = 28, int humidity = 50, bool nonLinearCreep = true, StruSoft.Interop_24.Cement_type cementType = StruSoft.Interop_24.Cement_type.Class_S, bool increaseFinalValue = true)
public static Material SetCreep(this Material material, int to = 28, int humidity = 50, bool nonLinearCreep = true, StruSoft.Interop_25.Cement_type cementType = StruSoft.Interop_25.Cement_type.Class_S, bool increaseFinalValue = true)
{
if (material.Concrete == null)
{
throw new System.ArgumentException("Material must be concrete!");
}

// deep clone. downstreams objs will have contain changes made in this method, upstream objs will not.
var creep = new StruSoft.Interop_24.Tda_creep2();
creep.EN_199211_2004 = new StruSoft.Interop_24.Tda_creep_EN1992()
var creep = new StruSoft.Interop_25.Tda_creep2();
creep.EN_199211_2004 = new StruSoft.Interop_25.Tda_creep_EN1992()
{
T0 = to,
RH = humidity,
Expand All @@ -263,16 +263,16 @@ public static Material SetCreep(this Material material, int to = 28, int humidit
return newMaterial;
}

public static Material SetShrinkage(this Material material, int to = 28, int humidity = 50, StruSoft.Interop_24.Cement_type cementType = StruSoft.Interop_24.Cement_type.Class_S)
public static Material SetShrinkage(this Material material, int to = 28, int humidity = 50, StruSoft.Interop_25.Cement_type cementType = StruSoft.Interop_25.Cement_type.Class_S)
{
if (material.Concrete == null)
{
throw new System.ArgumentException("Material must be concrete!");
}

// deep clone. downstreams objs will have contain changes made in this method, upstream objs will not.
var shrinkage = new StruSoft.Interop_24.Tda_shrinkage();
shrinkage.EN_199211_2004 = new StruSoft.Interop_24.Tda_shrinkageEN_199211_2004()
var shrinkage = new StruSoft.Interop_25.Tda_shrinkage();
shrinkage.EN_199211_2004 = new StruSoft.Interop_25.Tda_shrinkageEN_199211_2004()
{
Ts = to,
RH = humidity,
Expand All @@ -292,16 +292,16 @@ public static Material SetShrinkage(this Material material, int to = 28, int hum
return newMaterial;
}

public static Material setElasticity(this Material material, int to = 28, StruSoft.Interop_24.Cement_type cementType = StruSoft.Interop_24.Cement_type.Class_S)
public static Material setElasticity(this Material material, int to = 28, StruSoft.Interop_25.Cement_type cementType = StruSoft.Interop_25.Cement_type.Class_S)
{
if (material.Concrete == null)
{
throw new System.ArgumentException("Material must be concrete!");
}

// deep clone. downstreams objs will have contain changes made in this method, upstream objs will not.
var elasticity = new StruSoft.Interop_24.Tda_elasticity();
elasticity.EN_199211_2004 = new StruSoft.Interop_24.Tda_elasticityEN_199211_2004()
var elasticity = new StruSoft.Interop_25.Tda_elasticity();
elasticity.EN_199211_2004 = new StruSoft.Interop_25.Tda_elasticityEN_199211_2004()
{
T0 = to,
Cement_type = cementType,
Expand Down
33 changes: 2 additions & 31 deletions FemDesign.Core/Materials/MaterialDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Reflection;
using System.Linq;
using System.Xml.Serialization;
using FemDesign.Materials;

namespace FemDesign.Materials
{
Expand Down Expand Up @@ -106,37 +107,7 @@ public List<string> MaterialNames()
/// <returns></returns>
public Material MaterialByName(string materialName)
{
if (this.Materials != null)
{
foreach (Material material in this.Materials.Material)
{
if (material.Name == materialName)
{
// update object information
//material.Guid = System.Guid.NewGuid();
material.EntityModified();

// return
return material;
}
}
}
if (this.ReinforcingMaterials != null)
{
foreach (Material material in this.ReinforcingMaterials.Material)
{
if (material.Name == materialName)
{
// update object information
//material.Guid = System.Guid.NewGuid();
material.EntityModified();

// return
return material;
}
}
}
throw new System.ArgumentException($"Material was not found. Incorrect material name ({materialName}) or empty material database.");
return this.Materials.Material.MaterialByName(materialName);
}

public List<Material> GetSoilMaterial()
Expand Down
2 changes: 1 addition & 1 deletion FemDesign.Core/Model/Entities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public partial class Entities
[XmlElement("punching_reinforcement", Order = 20)]
public List<Reinforcement.PunchingReinforcement> PunchingReinforcements { get; set; } = new List<Reinforcement.PunchingReinforcement>();

[Obsolete("Use `NoShearControlRegions`", true)]
[Obsolete("Use `NoShearControlRegions`")]
[XmlElement("no-shear_region", Order = 21)]
public List<Reinforcement.NoShearRegionType> NoShearRegions { get; set; } = new List<Reinforcement.NoShearRegionType>();

Expand Down
11 changes: 3 additions & 8 deletions FemDesign.Core/Model/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public partial class Model
public List<StruSoft.Interop.StruXml.Data.Bolt_lib_type> BoltTypes { get; set; }

[XmlElement("bar_end_lib_type", Order = 19)]
public List<StruSoft.Interop_24.Bar_end_lib_type> BarEndReleaseTypes { get; set; }
public List<StruSoft.Interop_25.Bar_end_lib_type> BarEndReleaseTypes { get; set; }

[XmlElement("geometry", Order = 20)]
public StruSoft.Interop.StruXml.Data.DatabaseGeometry Geometry { get; set; }
Expand Down Expand Up @@ -344,7 +344,7 @@ public string SerializeToString()
/// <summary>
/// Add entities to Model.
/// </summary>
public Model AddEntities(List<Bars.Bar> bars, List<ModellingTools.FictitiousBar> fictitiousBars, List<Shells.Slab> shells, List<ModellingTools.FictitiousShell> fictitiousShells, List<Shells.Panel> panels, List<ModellingTools.Cover> covers, List<object> loads, List<Loads.LoadCase> loadCases, List<Loads.LoadCombination> loadCombinations, List<ISupportElement> supports, List<StructureGrid.Storey> storeys, List<StructureGrid.Axis> axes, List<Loads.ModelGeneralLoadGroup> loadGroups, bool overwrite)
public Model AddEntities(List<Bars.Bar> bars, List<ModellingTools.FictitiousBar> fictitiousBars, List<Shells.Slab> shells, List<ModellingTools.FictitiousShell> fictitiousShells, List<Shells.Panel> panels, List<ModellingTools.Cover> covers, List<ILoadElement> loads, List<Loads.LoadCase> loadCases, List<Loads.LoadCombination> loadCombinations, List<ISupportElement> supports, List<StructureGrid.Storey> storeys, List<StructureGrid.Axis> axes, List<Loads.ModelGeneralLoadGroup> loadGroups, bool overwrite)
{
// check if model contains entities, sections and materials
if (this.Entities == null)
Expand Down Expand Up @@ -418,12 +418,7 @@ public Model AddEntities(List<Bars.Bar> bars, List<ModellingTools.FictitiousBar>
}

if (loads != null)
{
foreach (object load in loads)
{
this.AddLoad(load, overwrite);
}
}
this.AddLoads(loads, overwrite);

if (loadCases != null)
{
Expand Down
4 changes: 2 additions & 2 deletions FemDesign.Core/Properties/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
// Revision
//

[assembly: AssemblyVersion("24.3.0")]
[assembly: AssemblyFileVersion("24.3.0")]
[assembly: AssemblyVersion("25.0.0")]
[assembly: AssemblyFileVersion("25.0.0")]
16 changes: 9 additions & 7 deletions FemDesign.Core/Reinforcement/PunchingReinforcement.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using FemDesign.GenericClasses;
using System.ComponentModel;
using System.Xml.Serialization;


Expand Down Expand Up @@ -150,10 +151,10 @@ public partial class StudRails
public PeikkoPsbProduct PeikkoPsbProduct { get; set; }

[XmlAttribute("pattern")]
public Pattern Pattern { get; set; }
public Pattern Pattern { get; set; } = Pattern.SemiOrthogonal;

[XmlAttribute("s0")]
public double _s0 { get; set; }
public double _s0 { get; set; } = 0.075;

[XmlIgnore]
public double S0
Expand All @@ -163,7 +164,7 @@ public double S0
}

[XmlAttribute("s1")]
public double _s1 { get; set; }
public double _s1 { get; set; } = 1.5;

[XmlIgnore]
public double S1
Expand All @@ -173,7 +174,7 @@ public double S1
}

[XmlAttribute("s2")]
public double _s2 { get; set; }
public double _s2 { get; set; } = 1.5;

[XmlIgnore]
public double S2
Expand All @@ -183,7 +184,7 @@ public double S2
}

[XmlAttribute("rails_on_circle")]
public int _railsOnCircle;
public int _railsOnCircle { get; set; } = 12;

[XmlIgnore]
public int RailsOnCircle
Expand All @@ -193,7 +194,7 @@ public int RailsOnCircle
}

[XmlAttribute("studs_on_rail")]
public int _studsOnRail;
public int _studsOnRail { get; set; } = 3;

[XmlIgnore]
public int StudsOnRail
Expand All @@ -213,7 +214,8 @@ public double Height
}

[XmlAttribute("use_minimal_elements")]
public bool UseMinimalElements { get; set; }
[DefaultValue(true)]
public bool UseMinimalElements { get; set; } = true;
}

[System.Serializable]
Expand Down
Loading