FEMParam.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. package com.miniframe.solverconfig.fem;
  2. import com.fasterxml.jackson.core.JsonProcessingException;
  3. import com.miniframe.solverconfig.SolverParam;
  4. import com.miniframe.tools.XiJsonUtil;
  5. import java.util.ArrayList;
  6. import java.util.List;
  7. public class FEMParam implements SolverParam {
  8. /**
  9. * 上传文件名称
  10. * "mesh_inp "3" "2.2_flat_dynamicResponse-transient.bdf"
  11. */
  12. private FEMElement mesh_inp =new FEMElement("mesh_inp","3",null);
  13. /**
  14. * Static(静态)
  15. * "static "3" "false"/"static "3" "true"
  16. */
  17. private FEMElement f_static =new FEMElement("static","3","false");
  18. /**
  19. * Stiffness Matrix Output(刚度矩阵输出)
  20. * "dump_stiff "1" "true"/“dump_stiff "1" "false"
  21. */
  22. private FEMElement dump_stiff =new FEMElement("dump_stiff","1","false");
  23. /**
  24. * Mass Matrix Output(质量矩阵输出)
  25. * "dump_mass" "1" "true"/"dump_mass“ "1" "false"
  26. */
  27. private FEMElement dump_mass =new FEMElement("dump_mass","1","true");
  28. /**
  29. * Node Strains Output(节点压力输出)
  30. * "strain_o "1" "true"/"strain_o "1" "false"
  31. */
  32. private FEMElement strain_o =new FEMElement("strain_o","1","false");
  33. /**
  34. * Modes(模式)
  35. * "eigenv" "3" "true"
  36. */
  37. private FEMElement eigenv =new FEMElement("eigenv","3","false");
  38. /**
  39. * Num of Eigenvalue(特征值)5
  40. * "num_eigv" "1" "5"
  41. */
  42. private FEMElement num_eigv =new FEMElement("num_eigv","1",null);
  43. /**
  44. * Method(方法)
  45. * Inverse iteration(逆迭代) "eigv_method "1" "1"
  46. * Lanczos(兰索斯) "eigv_method "1" "2"
  47. */
  48. private FEMElement eigv_method =new FEMElement("eigv_method","1",null);
  49. /**
  50. * Mass Coupled(质量耦合)
  51. * "coupled "1" "1"/"coupled" "1" "0"
  52. */
  53. private FEMElement coupled =new FEMElement("coupled","1","0");
  54. /**
  55. * C=αM+βK
  56. * α alphad "2" "12"
  57. * β betad "2" "0.00001"
  58. */
  59. private FEMElement alphad =new FEMElement("alphad","2","0.0");
  60. /**
  61. * C=αM+βK
  62. * α alphad "2" "12"
  63. * β betad "2" "0.00001"
  64. */
  65. private FEMElement betad =new FEMElement("betad","2","0.00001");
  66. /**
  67. * Method(方法)
  68. * HHT transient "1" "3"
  69. * Newmark(纽马克) transient "1" "2"
  70. * δn gam_newmark "2" "0.5"
  71. * αn bet_newmark "2" "0.25"
  72. * Direct(直接) transient "1" "1"
  73. */
  74. private FEMElement f_transient =new FEMElement("transient","1","1");
  75. /**
  76. * Method(方法)
  77. * HHT transient "1" "3"
  78. * Newmark(纽马克) transient "1" "2"
  79. * δn gam_newmark "2" "0.5"
  80. * αn bet_newmark "2" "0.25"
  81. * Direct(直接) transient "1" "1"
  82. */
  83. private FEMElement gam_newmark =new FEMElement("gam_newmark","2",null);
  84. /**
  85. * Method(方法)
  86. * HHT transient "1" "3"
  87. * Newmark(纽马克) transient "1" "2"
  88. * δn gam_newmark "2" "0.5"
  89. * αn bet_newmark "2" "0.25"
  90. * Direct(直接) transient "1" "1"
  91. */
  92. private FEMElement bet_newmark =new FEMElement("bet_newmark","2",null);
  93. /**
  94. * Step Control(步控制)
  95. * Case Num(案例数) "SID" "1" "1"
  96. */
  97. private FEMElement sid =new FEMElement("SID","1","1");
  98. /**
  99. * Total Time Steps(总时间的步骤) num_steps "1" "2"
  100. */
  101. private FEMElement num_steps =new FEMElement("num_steps","1","1");
  102. /**
  103. * Time Step(sencond)(时间步) dt_str "2" "0.25"
  104. */
  105. private FEMElement dt_str =new FEMElement("dt_str","2","0.0");
  106. /**
  107. * Output Interval(输出时间间隔) freq "1" "3"
  108. */
  109. private FEMElement freq =new FEMElement("freq","1","1");
  110. /**
  111. * Output Format (输出格式)
  112. * 1 sort "1" "1"
  113. * 2 sort "1" "2"
  114. */
  115. private FEMElement sort =new FEMElement("sort","1","1");
  116. /**
  117. * Nonlinear(非线性)
  118. * "nlgeom" "1" "0"/"nlgeom" "1" "1"
  119. */
  120. private FEMElement nlgeom =new FEMElement("nlgeom","1","0");
  121. /**
  122. * Solver(解算器)
  123. * MUMPS Direct Solver(MUMPS 直接解算器) solver "1" "0"
  124. * PCG Iterative Solver(PCG迭代解算器) solver "1" "1"
  125. * LDL Direct Solver(LDL 直接解算器) solver "1" "2"
  126. */
  127. private FEMElement solver =new FEMElement("solver","1","2");
  128. /**
  129. * Result FileName(结果文件名)
  130. * result_file "3" "2.2_flat_dynamicResponse-transient"
  131. */
  132. private FEMElement result_file =new FEMElement("result_file","3",null);
  133. public FEMElement getMesh_inp() {
  134. return mesh_inp;
  135. }
  136. public void setMesh_inp(FEMElement mesh_inp) {
  137. this.mesh_inp = mesh_inp;
  138. }
  139. public FEMElement getF_static() {
  140. return f_static;
  141. }
  142. public void setF_static(FEMElement f_static) {
  143. this.f_static = f_static;
  144. }
  145. public FEMElement getDump_stiff() {
  146. return dump_stiff;
  147. }
  148. public void setDump_stiff(FEMElement dump_stiff) {
  149. this.dump_stiff = dump_stiff;
  150. }
  151. public FEMElement getDump_mass() {
  152. return dump_mass;
  153. }
  154. public void setDump_mass(FEMElement dump_mass) {
  155. this.dump_mass = dump_mass;
  156. }
  157. public FEMElement getStrain_o() {
  158. return strain_o;
  159. }
  160. public void setStrain_o(FEMElement strain_o) {
  161. this.strain_o = strain_o;
  162. }
  163. public FEMElement getEigenv() {
  164. return eigenv;
  165. }
  166. public void setEigenv(FEMElement eigenv) {
  167. this.eigenv = eigenv;
  168. }
  169. public FEMElement getNum_eigv() {
  170. return num_eigv;
  171. }
  172. public void setNum_eigv(FEMElement num_eigv) {
  173. this.num_eigv = num_eigv;
  174. }
  175. public FEMElement getEigv_method() {
  176. return eigv_method;
  177. }
  178. public void setEigv_method(FEMElement eigv_method) {
  179. this.eigv_method = eigv_method;
  180. }
  181. public FEMElement getCoupled() {
  182. return coupled;
  183. }
  184. public void setCoupled(FEMElement coupled) {
  185. this.coupled = coupled;
  186. }
  187. public FEMElement getAlphad() {
  188. return alphad;
  189. }
  190. public void setAlphad(FEMElement alphad) {
  191. this.alphad = alphad;
  192. }
  193. public FEMElement getBetad() {
  194. return betad;
  195. }
  196. public void setBetad(FEMElement betad) {
  197. this.betad = betad;
  198. }
  199. public FEMElement getF_transient() {
  200. return f_transient;
  201. }
  202. public void setF_transient(FEMElement f_transient) {
  203. this.f_transient = f_transient;
  204. }
  205. public FEMElement getGam_newmark() {
  206. return gam_newmark;
  207. }
  208. public void setGam_newmark(FEMElement gam_newmark) {
  209. this.gam_newmark = gam_newmark;
  210. }
  211. public FEMElement getBet_newmark() {
  212. return bet_newmark;
  213. }
  214. public void setBet_newmark(FEMElement bet_newmark) {
  215. this.bet_newmark = bet_newmark;
  216. }
  217. public FEMElement getSid() {
  218. return sid;
  219. }
  220. public void setSID(FEMElement sid) {
  221. this.sid = sid;
  222. }
  223. public FEMElement getNum_steps() {
  224. return num_steps;
  225. }
  226. public void setNum_steps(FEMElement num_steps) {
  227. this.num_steps = num_steps;
  228. }
  229. public FEMElement getDt_str() {
  230. return dt_str;
  231. }
  232. public void setDt_str(FEMElement dt_str) {
  233. this.dt_str = dt_str;
  234. }
  235. public FEMElement getFreq() {
  236. return freq;
  237. }
  238. public void setFreq(FEMElement freq) {
  239. this.freq = freq;
  240. }
  241. public FEMElement getSort() {
  242. return sort;
  243. }
  244. public void setSort(FEMElement sort) {
  245. this.sort = sort;
  246. }
  247. public FEMElement getNlgeom() {
  248. return nlgeom;
  249. }
  250. public void setNlgeom(FEMElement nlgeom) {
  251. this.nlgeom = nlgeom;
  252. }
  253. public FEMElement getSolver() {
  254. return solver;
  255. }
  256. public void setSolver(FEMElement solver) {
  257. this.solver = solver;
  258. }
  259. public FEMElement getResult_file() {
  260. return result_file;
  261. }
  262. public void setResult_file(FEMElement result_file) {
  263. this.result_file = result_file;
  264. }
  265. public List<String> showAnalysisWindow() {
  266. List<String> analysisList=new ArrayList<>();
  267. if(this.alphad.showAnalysisStr()!=null)
  268. analysisList.add(this.alphad.showAnalysisStr());
  269. if(this.bet_newmark.showAnalysisStr()!=null)
  270. analysisList.add(this.bet_newmark.showAnalysisStr());
  271. if(this.betad.showAnalysisStr()!=null)
  272. analysisList.add(this.betad.showAnalysisStr());
  273. if(this.coupled.showAnalysisStr()!=null)
  274. analysisList.add(this.coupled.showAnalysisStr());
  275. if(this.dt_str.showAnalysisStr()!=null)
  276. analysisList.add(this.dt_str.showAnalysisStr());
  277. if(this.dump_mass.showAnalysisStr()!=null)
  278. analysisList.add(this.dump_mass.showAnalysisStr());
  279. if(this.dump_stiff.showAnalysisStr()!=null)
  280. analysisList.add(this.dump_stiff.showAnalysisStr());
  281. if(this.eigenv.showAnalysisStr()!=null)
  282. analysisList.add(this.eigenv.showAnalysisStr());
  283. if(this.eigv_method.showAnalysisStr()!=null)
  284. analysisList.add(this.eigv_method.showAnalysisStr());
  285. if(this.f_static.showAnalysisStr()!=null)
  286. analysisList.add(this.f_static.showAnalysisStr());
  287. if(this.f_transient.showAnalysisStr()!=null)
  288. analysisList.add(this.f_transient.showAnalysisStr());
  289. if(this.freq.showAnalysisStr()!=null)
  290. analysisList.add(this.freq.showAnalysisStr());
  291. if(this.gam_newmark.showAnalysisStr()!=null)
  292. analysisList.add(this.gam_newmark.showAnalysisStr());
  293. if(this.mesh_inp.showAnalysisStr()!=null)
  294. analysisList.add(this.mesh_inp.showAnalysisStr());
  295. if(this.nlgeom.showAnalysisStr()!=null)
  296. analysisList.add(this.nlgeom.showAnalysisStr());
  297. if(this.num_eigv.showAnalysisStr()!=null)
  298. analysisList.add(this.num_eigv.showAnalysisStr());
  299. if(this.num_steps.showAnalysisStr()!=null)
  300. analysisList.add(this.num_steps.showAnalysisStr());
  301. if(this.result_file.showAnalysisStr()!=null)
  302. analysisList.add(this.result_file.showAnalysisStr());
  303. if(this.sid.showAnalysisStr()!=null)
  304. analysisList.add(this.sid.showAnalysisStr());
  305. if(this.solver.showAnalysisStr()!=null)
  306. analysisList.add(this.solver.showAnalysisStr());
  307. if(this.sort.showAnalysisStr()!=null)
  308. analysisList.add(this.sort.showAnalysisStr());
  309. if(this.strain_o.showAnalysisStr()!=null)
  310. analysisList.add(this.strain_o.showAnalysisStr());
  311. return analysisList;
  312. }
  313. @Override
  314. public String paramJson() throws JsonProcessingException {
  315. String t = XiJsonUtil.objectToJson(this);
  316. return t;
  317. }
  318. }