How to extract the pressure loads from .cdb file #3321
-
I have a cdb file which is having pressure loads. In mapdl we have a method Mapdl.flist() which is giving only force loads. Can someone explain how to get pressure loads information from this Mapdl.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi @Saivellampati |
Beta Was this translation helpful? Give feedback.
-
Hi @Saivellampati, can you share the CDB file? |
Beta Was this translation helpful? Give feedback.
-
Hi @germa89, file is attached |
Beta Was this translation helpful? Give feedback.
-
the However you can do some string processing by doing (from #772): # turning off printing after each page break
mapdl.post1()
mapdl.header('OFF', 'OFF', 'OFF', 'OFF', 'OFF', 'OFF')
nsigfig = 10
mapdl.format('', 'E', nsigfig + 9, nsigfig)
mapdl.page(1E9, '', -1, 240)
#
sfe = mapdl.sfelist()
then you can workout some scheme to parse the text like: for i, line in enumerate(sfe.splitlines()):
if "LEMENT" in line and "LKEY" in line and "FACE NODES" in line:
results = sfe.splitlines()[i+1:]
import re
lines = []
for line in results:
line = re.findall(r"(\d+\.*\d*)", line)
if len(line) == 5: # begining group
group = line[:2]
data = line[2:]
elif len(line) == 3:
data = line
else:
raise Exception("weird line")
lines.append([*group, *data])
array = np.array(lines).astype(float) which gives you
|
Beta Was this translation helpful? Give feedback.
HI @Saivellampati
the
SF
andSFE
loads post processing commands are not supported yet.However you can do some string processing by doing (from #772):
sfe
object will be: