×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Subroutine within subroutine / global variable

Subroutine within subroutine / global variable

Subroutine within subroutine / global variable

(OP)
Hey All,

I am running a weld model on ABAQUS using DFLUX subroutine and wanted to request HBF (heat body flux) as a field output . However, since Flux(1) cannot be requested as an output according to the documentation (surface and element based loading output variables do not include contributions from loads applied through user subroutines), I am trying different ways to show the input heat flux in the visualization module.

1. I have been able to print it to the dat file using:
if (npt.eq.1) then
write (6,*) 'flux @',noel,'=',flux(1),'@t=',time(1)
endif

2. Another way that I tried (not working) was using a second user subroutine, UVARM. I tried to use module in both DFLUX and UVRAM; in DFLUX saved the flux value in the module and in UVARM you read it from the module and store it into the user subroutine, which then can be contour plotted (simplified). Also, how can integrate the heat power?

module shareVars
double precision, SAVE :: fluxval
end module shareVars

subroutine DFLUX
use shareVars
FLUX(1) = X
fluxval = FLUX(1)

SUBROUTINE UVARM
use shareVars
UVAR(1)= fluxval

But, after doing this, I don't get the right flux contour plot in my odb. What I see is a random pattern throughout my model.
Is there something wrong with the way I used module and UVARM? Or possibly due to using more than 1 cpu?

3. I am also trying to call UVARM within DFLUX (simplified):

module shareVars

REAL, SAVE :: fluxval

contains
SUBROUTINE UVARM

UVAR(1)= flux val
end subroutine UVARM

end module shareVars

SUBROUTINE DFLUX

call UVARM

But I get an error saying:

error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.

Would anyone please give me an advice?

Thanks a lot.

Hajakala

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources