1. Aashish Nahar


    I'm trying to compile texgen4sc, i have fixed quite few bugs while compiling the src and now i am down to just few errors related to sys/wait.h (could not be found), i understand that this is a unix header file, how could i get around this error on windows with visual studio 11 (2012)?



  2. Xin Liu


    Thank you for your interest in texgen4sc. For compiling problems, you can ask the texgen development team. You may find usefully information from texgen forum or ask your questions there ( 

  3. Aashish Nahar

    No but sys/wait.h is prof yu header files in texgenmainframe.cpp

  4. Xin Liu

    That head file is used mainly for the "run_sc" function. You can try to comment the header file to see if you can get around the error. The "run_sc" function is only used if you have a local SwiftComp.exe installed in your computer.

  5. Aashish Nahar

    Sorry i am asking too many questions, i commented the header file now i get 46 errors telling there are bunch of undeclared identifier example: OnSaveSCfile,this,scstring,HD etc

  6. Xin Liu

    Comment the head files like sys/wait.h, and make an empty "run_sc" function like  int run_sc(string scfile, string hd){return 1;}

  7. Aashish Nahar

    I created int run_sc(string scfile, string HD, string fork......){return 1;}

    still get the same errors, i don't know what i could do?

    what is the point of using texgen4sc if i cannot run sc?




  8. Wenbin Yu

    What do you mean that you cannot run SC? You can run SC in the cloud on cdmHUB. If you want to run TexGen4SC in your local machine, then you should request SC from AnalySwift. ---- Emailed forum response from
  9. Xin Liu

    Where the "string fork" comes from in your function? Also, did you remove the corresponding objective file before compiling?

    In general, compiling open source code is a difficult, time-consuming, and frustrating task if users don't have enough experiences and skills (which is normal as we are in the mechanics/materials field instead of computer science). Therefore, I would always recommend users to the online version if they don't have specific reasons for a local version. As Dr. Yu mentioned, you will also need to request SC from AnalySwift for a local version.

    Making an empty run_sc function is a debugging step to see if the errors can be removed (which should be removed). However, compiling errors are not just about the code itself, the OS system and compiler may also cause some errors. If you think it is too difficult for you to compile the code, you can always run the online version at cdmHUB.

  10. Aashish Nahar

    Thanks Xin Liu, i am trying to use abaqus swift comp gui to analyze woven fabric imported from texgen, but i get error 15 if use a lot of voxels~ 100x100x100, but when i use less number of voxels i get no error but the results don't match cloud results from texgen4sc.

  11. Xin Liu

    Hi Aashish,

    I don't use Abaqus SC GUI, but I think the issue is not related to voxels. A useful tip to debug this is to compare the .sc files generated by Abaqus SC GUI and texgen4sc to see if they are the same. But why do you want to use Abaqus SC GUI if you can use texgen4sc to perform homogenization?

  12. Aashish Nahar

    I need to homogenize woven fabric sandwiched between copper surfaces On Wed, Jul 31, 2019 at 5:37 PM Xin Liu @ cdmHUB - The Composites HUB <> wrote: ---- Emailed forum response from
  13. Xin Liu

    If you only want to perform homogenization to get effective properties, you can use texgen4sc. You just need to create the unit cell (we call it SG) to represent your woven core in texgen4sc and run homogenization using solid model.

  14. Aashish Nahar

    Thank you, i am already doing this but i would like to run abaqus swift comp gui with woven fabric glued to copper sheet so that i can dehomogenize and look at local stresses and strains? On Wed, Jul 31, 2019 at 6:10 PM Xin Liu @ cdmHUB - The Composites HUB <> wrote: ---- Emailed forum response from
  15. Xin Liu

    I don't know the codes inside Abaqus-SC GUI, but I guess the GUI may only work for some built-in common SGs and some regular customized SGs. For your problem, you may need to import the woven part from texgen4sc and create other copper parts in Abaqus. You may also need to assemble them by merging the nodes or other operations. Besides, you will have element orientations in different coordinate systems. The final model would much complex than the common micromechanical models.

    We did some similar work ("Tao, F., Lyu, X., Liu, X. and Yu, W., 2019. Multiscale analysis of multilayer printed circuit board using mechanics of structure genome. Mechanics of Advanced Materials and Structures, pp.1-10."). I think you may need more understanding about the SC input file (you can find SCtheory in and write some python scripts to extract information from the Abaqus model to generate the .sc file.