Ejemplo n.º 1
0
        internal ILogFactory CreateLogFactory(PreprocessorModel model)
        {
            var logFactory = new VtkLogFactory(model.CoreModel, outputDirectory)
            {
                LogDisplacements = Displacements,
                LogStrains       = Strains,
                LogStresses      = Stresses,
            };

            if (StressesVonMises)
            {
                if (model.Dimensions == PreprocessorModel.ProblemDimensions.TwoDimensionalPlaneStress)
                {
                    logFactory.VonMisesStressCalculator = new PlaneStressVonMises();
                }
                else if (model.Dimensions == PreprocessorModel.ProblemDimensions.TwoDimensionalPlaneStrain)
                {
                    logFactory.VonMisesStressCalculator = new ElasticPlaneStrainVonMises(model.PlainStrainMaterial);
                }
                else if (model.Dimensions == PreprocessorModel.ProblemDimensions.ThreeDimensional)
                {
                    throw new NotImplementedException();
                }
            }

            return(logFactory);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Instantiates an new <see cref="Job"/>. Use its properties to set up the simulation.
 /// </summary>
 /// <param name="model">The mesh, supports, loads, etc. that will be simulated.</param>
 public Job(PreprocessorModel model)
 {
     this.model = model;
 }