*NODE PRINT generates the .dat file containing nodal variables eg displacements. Is there a way to access those variables other than reading the .dat file?
You can use *NODE FILE
to write output to the .frd file so that it can be viewed in GraphiX or other postprocessor.
But there is no way to access the data except through the files that are written to disk?
This is a standard approach. How do you want to access the data ?
I am creating small models to analyse, programmatically generating the inp file and reading the dat file. Because of the time it takes for the output file to be written I sometimes get a locked file error - my program is trying to read it before it has finished being written. So I was wondering if there is another way to access the data, but it seems not.
It sounds like you need to wait for the CCX process to properly exit before reading the file. I’m using .NET on Windows and found that Process.Exited event seems to be a little premature somehow so I also wait for Process.WaitForExit() before reading the .frd file and that seems to work robustly.
But I also read the file with the FileShare.ReadWrite flag which allows it to be written and read by different processes at the same time, so there might be some risk of losing the end of the file, I’m not sure.
Or perhaps just retry in a loop when until it succeeds?
Also, Hello Graham. I remember struggling with a deceptively simple problem of yours! I hope you’re having more success.
I found a simple way around the locked file.
And I am still working on that other problem but I think I have found a way ahead.