Topic: OOFEM freezes during StaggeredProblem solution

The focus of many of my simulations is determining the thermal stress in parts exposed to high heat fluxes. I tried to build a simple StaggeredProblem to test using the temperature distribution from a StationaryProblem heat transfer simulation as an input to a LinearStatic structural simulation, but, everytime I try to run the staggered simulation, OOFEM freezes without an error message after the solver for the thermal problem converges. The individual TM and SM simulation files work as expected on their own, but do not work together for some reason. Any explanation of why this might not be working would be appreciated.

Input files:

thermal_test1_tmsm_0.oofem

thermal_test1_tmsm_0.out
A simple test of 2D heat transfer and thermal expansion
StaggeredProblem nsteps 1 timedefinedbyprob 1 prob1 "thermal_test1_ht_0.oofem" prob2 "thermal_test1_sta_0.oofem"

thermal_test1_ht_0.oofem

thermal_test1_ht_0.out
A simple test of 2D heat transfer and thermal expansion
StationaryProblem nsteps 1 exportfields 1 5
domain HeatTransfer
OutputManager tstep_all dofman_all element_all
ndofman 6 nelem 2 ncrosssect 1 nmat 1 nbc 2 nic 1 nltf 1 nset 3
node 1 coords 2 0.0 0.0
node 2 coords 2 2.0 0.0
node 3 coords 2 4.0 0.0
node 4 coords 2 0.0 4.0
node 5 coords 2 2.0 4.0
node 6 coords 2 4.0 4.0
Quad1ht 1 nodes 4 1 2 5 4 NIP 4
Quad1ht 2 nodes 4 2 3 6 5 NIP 4
SimpleTransportCS 1 thickness 2.000 mat 1 set 3
IsoHeat 1 d 1.000e+00 k 1.000e+00 c 1.000e+00
BoundaryCondition 1 loadTimeFunction 1 dofs 1 10 values 1 20.0 set 1
BoundaryCondition 2 loadTimeFunction 1 dofs 1 10 values 1 50.0 set 2
InitialCondition 1 Conditions 1 u 20 dofs 1 10 set 3
ConstantFunction 1 f(t) 1.0
Set 1 nodes 2 1 4
Set 2 nodes 2 3 6
Set 3 elementranges {(1 2)}

thermal_test1_sta_0.oofem

thermal_test1_sta_0.out
A simple test of 2D heat transfer and thermal expansion
LinearStatic nsteps 1
domain 2dPlaneStress
OutputManager tstep_all dofman_all element_all
ndofman 6 nelem 2 ncrosssect 1 nmat 1 nbc 2 nic 0 nltf 1 nset 3
node 1 coords 2 0.0 0.0
node 2 coords 2 2.0 0.0
node 3 coords 2 4.0 0.0
node 4 coords 2 0.0 4.0
node 5 coords 2 2.0 4.0
node 6 coords 2 4.0 4.0
PlaneStress2d 1 nodes 4 1 2 5 4 NIP 4
PlaneStress2d 2 nodes 4 2 3 6 5 NIP 4
SimpleCS 1 thick 2.000 material 1 set 3
IsoLE 1 d 1.000e-09 E 1.0000e+05 n 0.300 talpha 1.0000e-05
BoundaryCondition 1 loadTimeFunction 1 dofs 1 1 values 1 0.0000e+00 set 1
BoundaryCondition 2 loadTimeFunction 1 dofs 1 2 values 1 0.0000e+00 set 2
ConstantFunction 1 f(t) 1.0
Set 1 nodes 2 1 4
Set 2 nodes 1 1
Set 3 elementranges {(1 2)}

This is being run on Windows. This is the only output that is printed before OOFEM stops responding:

____________________________________________________
           OOFEM - Finite Element Solver
        Copyright (C) 1994-2014 Borek Patzak
____________________________________________________
Total number of solution steps     1
Total number of solution steps     1
Total number of solution steps     1
Solving [step number     1, time 1.000000e+00]
Assembling external forces
Solving ...
NRSolver: Iteration ForceError
----------------------------------------------------------------------------
NRSolver: 0      T_f:  9.191e-01
NRSolver: 1      T_f:  1.675e-16

Re: OOFEM freezes during StaggeredProblem solution

Hi,

it seems to me that there is a bug in stationarytransportproblem.C and the lines
  if ( !UnknownsField ) { // can exist from nonstationary transport problem
        //UnknownsField.reset( new DofDistributedPrimaryField(this, 1, FT_TransportProblemUnknowns, 0) );
        UnknownsField.reset( new PrimaryField(this, 1, FT_TransportProblemUnknowns, 0) );
    }

should be moved before 
// read field export flag
    IntArray exportFields;
    IR_GIVE_OPTIONAL_FIELD(ir, exportFields, _IFT_StationaryTransportProblem_exportfields);
    if ( exportFields.giveSize() ) {

Re: OOFEM freezes during StaggeredProblem solution

Thank you. I will setup a git clone and try it with this change.

Bailey

Re: OOFEM freezes during StaggeredProblem solution

So, I have managed to build OOFEM on Windows (MinGW) from the git repository, but I've run into an unusual issue. I can run the program directly by executing it from the command line, but it won't run when started as a subprocess from my python code, which is never a problem I have had with the binaries downloaded from the website. I use the python "call" function to run OOFEM. When I attempt to run the locally-compiled version, the exit value is -1073741515. I'm still looking for potential causes, but could this be a problem with how OOFEM was built?

Bailey

Re: OOFEM freezes during StaggeredProblem solution

After building OOFEM properly on linux, I made the change as you described and the StaggeredProblem works as expected.

Bailey