calculix / CalculiX-Examples

CalculiX examples by Prof. Martin Kraska from Brandenburg University of Applied Sciences. Excellent starting point to master parametric modelling with CGX and CCX.
MIT License
299 stars 92 forks source link

Problem with Strains in dat2txt #30

Closed 3rav closed 5 years ago

3rav commented 6 years ago

Hi,

I have problem with strain results in xxx.dat (using dat2txt):

a. If I have only: *EL PRINT,ELSET=Element, TOTALS=ONLY E

then dat2txt not generate any file.

b. If I have: NODE PRINT, NSET=Nepsilon, TOTALS=ONLY U NODE PRINT, NSET=Nfix_y, TOTALS=ONLY RF + *EL PRINT,ELSET=Element, TOTALS=ONLY E

then strains are add to total force file:

"0.025 1.174672E-09 -1.091615E+01 -1.705246E-16 strains elem, integ.pnt.,exx,eyy,ezz,exy, ......."

example: total force fx,fy,fz_NFIX_Y.txt

c. If I have in *EL FILE S, SDV then dat2txt creates the right files for them like: internal state variables elem, integ.pnt.,values_ELEMENT stresses elem, integ.pnt.,sxx,syy,szz,sxy,sxz,syz_ELEMENT

Regards

mkraska commented 6 years ago

Could you please provide an example input and the .dat-file you generate? (The link in your post doesn't work)

Is the problem in dat2txt not extracting data which actually are in the .dat file? Or are the data missing in .dat already?

as to a) What would you expect? There is no point in summing up element strains. as to b) What are you expecting for the totals of E and U? as to c) Thanks for the feedback, never tested dat2txt with SDV requests. Good to hear that it works.

3rav commented 6 years ago

Hi Martin,

I want the program dat2txt to create a file (for E in EL PRINT) strain elem, integ.pnt., exx, eyy, ezz, exy, exz, eyz_XYZ (as for S in EL PRINT) from the .dat file.

My inputs (.inp, .fbd, .dat): inputs.zip

oldninja commented 5 years ago

Hi 3rav,

There is a typo on the Fortran subroutine that prints the .dat file - the strains line has the word "forset" together as one word, as opposed to "for set" (two separate words). Look at line 30 of your .dat file. You can edit the Fortran subroutine in ccx to address this and recompile.

Dummy

Looking at ccx_2.15, the Fortran file should be "printout.f" and lines should be 252 and 283: Strains You can edit these two lines and recompile. Then test with the dat2txt script :)

Thanks,

3rav commented 5 years ago

Thank you very much, I wrote to Mr. Guido regarding this typo.

mkraska commented 5 years ago

The problem could be solved by making "dat2txt.py" accepting "for set" as well as "forset". Removing the space character after "for" in line 11 of dat2txt.py should do the trick.

pH = re.compile(' (.+) for .*set\s(\S+) and time (.+)')

However, I don't remember why I didn't just ask for "for set". If I find time to do tests I'll see if the trick works without side effects. Let me know if the fix is safe.

oldninja commented 5 years ago

Hi Dr. Kraska, That's a good point. I went the other way, trying to fix the typo in the source code, because I thought others may use their own scripts and maybe were not getting the right information. I also contacted Dr. Dhondt to let him know about it. So far the fix in the ccx source code works great with your "dat2txt.py" script. Thanks for your work!

mkraska commented 5 years ago

That's open source community at it's best! Let's hope that your fix finds it's way into the official CCX release.