FEM-Design 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {FEM_Design-0.0.4.dist-info → FEM_Design-0.0.6.dist-info}/METADATA +10 -6
- FEM_Design-0.0.6.dist-info/RECORD +14 -0
- femdesign/__init__.py +1 -0
- femdesign/calculate/analysis.py +22 -6
- femdesign/calculate/command.py +1 -1
- femdesign/comunication.py +16 -2
- FEM_Design-0.0.4.dist-info/RECORD +0 -14
- {FEM_Design-0.0.4.dist-info → FEM_Design-0.0.6.dist-info}/LICENSE +0 -0
- {FEM_Design-0.0.4.dist-info → FEM_Design-0.0.6.dist-info}/WHEEL +0 -0
- {FEM_Design-0.0.4.dist-info → FEM_Design-0.0.6.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: FEM-Design
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: The FEM-Design API package
|
|
5
5
|
Author-email: FEM-Design <femdesign.api@strusoft.com>
|
|
6
|
-
Maintainer-email: Marco Pellegrino <marco.pellegrino@strusoft.com>
|
|
6
|
+
Maintainer-email: Marco Pellegrino <marco.pellegrino@strusoft.com>, Illyés Zoltán <sinnach@strusoft.hu>
|
|
7
7
|
Project-URL: Homepage, https://femdesign-api-docs.onstrusoft.com
|
|
8
8
|
Project-URL: Repository, https://github.com/strusoft/femdesign-api
|
|
9
9
|
Project-URL: Issues, https://github.com/strusoft/femdesign-api/issues
|
|
@@ -48,18 +48,22 @@ pipe = FemDesignConnection()
|
|
|
48
48
|
try:
|
|
49
49
|
pipe.SetVerbosity(Verbosity.SCRIPT_LOG_LINES)
|
|
50
50
|
pipe.Open(r"simple_beam.str")
|
|
51
|
+
|
|
52
|
+
static_analysis = Analysis.StaticAnalysis()
|
|
53
|
+
pipe.RunAnalysis(static_analysis)
|
|
54
|
+
|
|
51
55
|
pipe.RunAnalysis(Analysis.FrequencyAnalysis(num_shapes=5))
|
|
52
|
-
pipe.Save(r"
|
|
53
|
-
|
|
54
|
-
csv_file=r"quantity-estimation-steel.csv")
|
|
56
|
+
pipe.Save(r"simple_beam_out_2.str")
|
|
57
|
+
|
|
55
58
|
pipe.Exit()
|
|
56
59
|
except Exception as err:
|
|
57
60
|
pipe.KillProgramIfExists()
|
|
58
61
|
raise err
|
|
59
62
|
```
|
|
60
63
|
|
|
61
|
-
A wider list of examples can be found in [example](https://github.com/strusoft/femdesign-api/tree/master/FemDesign.
|
|
64
|
+
A wider list of examples can be found in [example](https://github.com/strusoft/femdesign-api/tree/master/FemDesign.Python/examples)
|
|
62
65
|
|
|
63
66
|
## Documentation
|
|
64
67
|
|
|
68
|
+
|
|
65
69
|
https://femdesign-api-docs.onstrusoft.com/docs/intro
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
femdesign/__init__.py,sha256=PJqnani1chSiNWvU3DUkDaWDW0nP5lbHflTmezZLso4,17
|
|
2
|
+
femdesign/comunication.py,sha256=dMn8a2idGtVTG3tO2YnJw-6jk9_cJHd5DKWv9lR0s8M,15896
|
|
3
|
+
femdesign/database.py,sha256=lHu5mIVtYw1s6tILOoLdNsLmI6IqGP-zwBlXI4ZKX2s,2113
|
|
4
|
+
femdesign/calculate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
femdesign/calculate/analysis.py,sha256=ETQzTj3pKvF1SzfQMDw4d1ObH0MxFNtX2qJcQ4sRfck,16068
|
|
6
|
+
femdesign/calculate/command.py,sha256=DHh2Oa_-la3RJTAWXOaePxvUTadF3xRHfH5BVvPFaTo,14241
|
|
7
|
+
femdesign/calculate/fdscript.py,sha256=m7L-j1kfW3UJ-eeR9ouPSsZGugeuuBNI8WuY4zRtHYk,2708
|
|
8
|
+
femdesign/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
femdesign/utilities/filehelper.py,sha256=ocztMNTePr-bUpquY8DAI1s4BHptlhnMzwYOMrDbB_8,1528
|
|
10
|
+
FEM_Design-0.0.6.dist-info/LICENSE,sha256=C1trwjHDz-8nu89CQ5_3BXEJiOrsl1tJJqtEzEi_dA0,1086
|
|
11
|
+
FEM_Design-0.0.6.dist-info/METADATA,sha256=nDoBVoJGH9Zl_PYxMe6_sLF7ii-pbX_w5tgn_1W7-g8,3062
|
|
12
|
+
FEM_Design-0.0.6.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
13
|
+
FEM_Design-0.0.6.dist-info/top_level.txt,sha256=QcarGV2EBCVqig6Yj3dB5-Q8Mi-eXtEEhUyRKWIP21I,10
|
|
14
|
+
FEM_Design-0.0.6.dist-info/RECORD,,
|
femdesign/__init__.py
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "0.0.6"
|
femdesign/calculate/analysis.py
CHANGED
|
@@ -304,7 +304,7 @@ class Analysis:
|
|
|
304
304
|
elemfine : bool = True,
|
|
305
305
|
diaphragm : bool = False,
|
|
306
306
|
peaksmoothings : bool = False,
|
|
307
|
-
|
|
307
|
+
combSettings : CombSettings = None,
|
|
308
308
|
stage : Stage = None,
|
|
309
309
|
freq : Freq = None,
|
|
310
310
|
footfall : Footfall = None,
|
|
@@ -334,7 +334,7 @@ class Analysis:
|
|
|
334
334
|
self.peaksmoothings = peaksmoothings
|
|
335
335
|
|
|
336
336
|
self.stage = stage
|
|
337
|
-
self.comb =
|
|
337
|
+
self.comb = combSettings
|
|
338
338
|
self.freq = freq
|
|
339
339
|
self.footfall = footfall
|
|
340
340
|
#self.bedding = bedding
|
|
@@ -388,8 +388,12 @@ class Analysis:
|
|
|
388
388
|
return analysis
|
|
389
389
|
|
|
390
390
|
@classmethod
|
|
391
|
-
def StaticAnalysis(cls,
|
|
392
|
-
return cls(calcCase = calcCase, calcComb = calcComb
|
|
391
|
+
def StaticAnalysis(cls, calcCase : bool = True, calcComb : bool = True):
|
|
392
|
+
return cls(calcCase = calcCase, calcComb = calcComb)
|
|
393
|
+
|
|
394
|
+
def SetCombinations(self, combSettings : CombSettings, combitems : list[CombItem]):
|
|
395
|
+
self.comb = combSettings
|
|
396
|
+
self.comb.combitems = combitems
|
|
393
397
|
|
|
394
398
|
@classmethod
|
|
395
399
|
def FrequencyAnalysis(cls, num_shapes : int = 5, auto_iter : int = 0, max_sturm : int = 0, norm_unit : Freq.ShapeNormalization = Freq.ShapeNormalization.MassMatrix, x : bool = True, y : bool = True, z : bool = True, top : bool = -0.01):
|
|
@@ -397,8 +401,20 @@ class Analysis:
|
|
|
397
401
|
return cls(calcFreq = True, freq = freq)
|
|
398
402
|
|
|
399
403
|
@classmethod
|
|
400
|
-
def FootfallAnalysis(cls, footfall : Footfall
|
|
401
|
-
return cls(calcFootfall =
|
|
404
|
+
def FootfallAnalysis(cls, footfall : Footfall):
|
|
405
|
+
return cls(calcFootfall = True, footfall = footfall)
|
|
406
|
+
|
|
407
|
+
@classmethod
|
|
408
|
+
def GroundAcceleration(cls, thgroundacc : ThGroundAcc):
|
|
409
|
+
return cls(calcThGrounAcc = True, thgroundacc = thgroundacc)
|
|
410
|
+
|
|
411
|
+
@classmethod
|
|
412
|
+
def ExcitationForce(cls, thexforce : ThExForce):
|
|
413
|
+
return cls(calcThExforce = True, thexforce = thexforce)
|
|
414
|
+
|
|
415
|
+
@classmethod
|
|
416
|
+
def PeriodicExcitation(cls, periodicexc : PeriodicExc):
|
|
417
|
+
return cls(calcPeriodicExc = True, periodicexc = periodicexc)
|
|
402
418
|
|
|
403
419
|
# class Bedding:
|
|
404
420
|
# def __init__(self, Ldcomb="a", Meshprep=0, Stiff_X=0.5, Stiff_Y=0.5):
|
femdesign/calculate/command.py
CHANGED
|
@@ -406,7 +406,7 @@ class CmdListGen:
|
|
|
406
406
|
raise ValueError("outfile must have suffix .csv")
|
|
407
407
|
|
|
408
408
|
if not outfile:
|
|
409
|
-
outfile = pathlib.Path(
|
|
409
|
+
outfile = pathlib.Path(bscfile).with_suffix(".csv")
|
|
410
410
|
|
|
411
411
|
if not os.path.exists(os.path.dirname(os.path.abspath(outfile))):
|
|
412
412
|
os.makedirs(os.path.dirname(os.path.abspath(outfile)))
|
femdesign/comunication.py
CHANGED
|
@@ -12,6 +12,7 @@ import win32file
|
|
|
12
12
|
import win32pipe
|
|
13
13
|
|
|
14
14
|
import os
|
|
15
|
+
import shutil
|
|
15
16
|
|
|
16
17
|
"""
|
|
17
18
|
FEM - Design usage with pipe
|
|
@@ -98,7 +99,7 @@ def GetElapsedTime(start_time):
|
|
|
98
99
|
|
|
99
100
|
class _FdConnect:
|
|
100
101
|
|
|
101
|
-
def __exit__(self
|
|
102
|
+
def __exit__(self):
|
|
102
103
|
self.Detach()
|
|
103
104
|
self.ClosePipe()
|
|
104
105
|
|
|
@@ -302,9 +303,11 @@ class FemDesignConnection(_FdConnect):
|
|
|
302
303
|
pipe_name : str ="FdPipe1",
|
|
303
304
|
verbose : Verbosity = Verbosity.SCRIPT_LOG_LINES,
|
|
304
305
|
output_dir : str = None,
|
|
305
|
-
minimized : bool = False,
|
|
306
|
+
minimized : bool = False,
|
|
307
|
+
delete_dir : bool = True):
|
|
306
308
|
super().__init__(pipe_name)
|
|
307
309
|
|
|
310
|
+
self.delete_dir = delete_dir
|
|
308
311
|
self._output_dir = output_dir
|
|
309
312
|
|
|
310
313
|
os.environ["FD_NOLOGO"] = "1"
|
|
@@ -315,6 +318,14 @@ class FemDesignConnection(_FdConnect):
|
|
|
315
318
|
self.Start(fd_path)
|
|
316
319
|
self.LogLevel(verbose)
|
|
317
320
|
|
|
321
|
+
def __exit__(self):
|
|
322
|
+
super().__exit__()
|
|
323
|
+
if(self.delete_dir):
|
|
324
|
+
try:
|
|
325
|
+
shutil.rmtree(os.path.join(self.output_dir, "scripts"))
|
|
326
|
+
except:
|
|
327
|
+
pass
|
|
328
|
+
|
|
318
329
|
@property
|
|
319
330
|
def output_dir(self):
|
|
320
331
|
if self._output_dir == None:
|
|
@@ -452,3 +463,6 @@ class FemDesignConnection(_FdConnect):
|
|
|
452
463
|
def Disconnect(self):
|
|
453
464
|
super().Detach()
|
|
454
465
|
win32pipe.DisconnectNamedPipe(self.pipe_send)
|
|
466
|
+
|
|
467
|
+
def Close(self):
|
|
468
|
+
self.__exit__()
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
femdesign/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
femdesign/comunication.py,sha256=K3f3jIa3cVpSeyiSdpEDMz__7X2_LeGpqEhdcDoJImI,15564
|
|
3
|
-
femdesign/database.py,sha256=lHu5mIVtYw1s6tILOoLdNsLmI6IqGP-zwBlXI4ZKX2s,2113
|
|
4
|
-
femdesign/calculate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
femdesign/calculate/analysis.py,sha256=EbwJTOa4ZNYsfoVvAEYKCEsOJ91L7G-SphfiCc6XEqE,15527
|
|
6
|
-
femdesign/calculate/command.py,sha256=_TYMNJJHkxaSV0fDBqCHrAN5uI_Pz593qqsOa9B_Ddo,14246
|
|
7
|
-
femdesign/calculate/fdscript.py,sha256=m7L-j1kfW3UJ-eeR9ouPSsZGugeuuBNI8WuY4zRtHYk,2708
|
|
8
|
-
femdesign/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
femdesign/utilities/filehelper.py,sha256=ocztMNTePr-bUpquY8DAI1s4BHptlhnMzwYOMrDbB_8,1528
|
|
10
|
-
FEM_Design-0.0.4.dist-info/LICENSE,sha256=C1trwjHDz-8nu89CQ5_3BXEJiOrsl1tJJqtEzEi_dA0,1086
|
|
11
|
-
FEM_Design-0.0.4.dist-info/METADATA,sha256=w0dMM7-WA2vobOFaaxNddwua1g8QvpWY9bDfSJj18zg,3070
|
|
12
|
-
FEM_Design-0.0.4.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
13
|
-
FEM_Design-0.0.4.dist-info/top_level.txt,sha256=QcarGV2EBCVqig6Yj3dB5-Q8Mi-eXtEEhUyRKWIP21I,10
|
|
14
|
-
FEM_Design-0.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|