Author Topic: Space and Time Dependent Boundary Conditions for Node Set  (Read 6246 times)

a118145

  • Guest
Space and Time Dependent Boundary Conditions for Node Set
« on: August 16, 2020, 11:32:36 PM »
Dear Feap forum,

suppose, I have a square domain with x=[0,1] and y=[-0.5,0.5]. Along the upper and lower edge, I want to apply a boundary condition, which is time dependent and takes into account the nodal coordinates. More precisely, the applied displacement is calculated as

u_x = 0 and u_y(x,y,t) = u_ref/2 * (1- tanh( (x - x_0 - v*t)/d ) * sign(y)

where u_ref, x_0, v and d are parameters. This boundary condition can be imagined as rollers, which are attached to a hyperbolic tangent shape. The fixed shape moves in positive x-direction and applies a tensile load, which varies for every node along the edges.

As far as I understand, this would only be possible in standard feap (v8.5) if I applied a different Dirichlet BC for every single node along the upper and lower edge. However, this is not feasible for my problem types. My idea is to implement the function as user proportional load in ./user/uprop.f. I already had a look at the predefined proportional load types 1 - 7 but could not figure out, how to make the load space dependent. Could you provide me with a hint how I can extend the simple example of an exponential user proportional load, which can be found in the feap manual on page 518 (feap 8.5), Table D.2. I attached a screenshot for convenience.

Warm regards,

a118145

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: Space and Time Dependent Boundary Conditions for Node Set
« Reply #1 on: August 17, 2020, 01:11:35 AM »
The user proportional load is not what you are after.

The approach to take would be to use the EBOUndary command to declare the top and bottom edges to be Dirichlet boundaries.  Then, write a custom ULOAd.f file that will set the Dirichlet values in hr(np(30)) based on the current time.  hr(np(30)) through hr(np(30)+nneq-1) should be the forced values for all the nodes (both Neumann and Dirichlet values).  As you loop through all the nodes you can check the coordinates in hr(np(43)) before setting the values.

If you need more explanation, just ask.

a118145

  • Guest
Re: Space and Time Dependent Boundary Conditions for Node Set
« Reply #2 on: August 17, 2020, 02:35:39 AM »
Dear Professor Govindjee,

Thank you for your quick answer. Here is, what I understood from your reply:

1) The edges, where the boundary conditions are applied, are still determined/defined using the EBOU command -> no modification necessary.
2) In pmesh.f define new command for my special load type, say UDIS (user displacement, UFOR analogously). This includes the definition of an additional flag eudfl comparable to edifl.
3) In pedgin.f, if the flag edifl is true, this invokes a procedure similar to edifl, lines 76-100.
4) Instead of the setting constant values, I can account for nodal coordinates.

Please correct me, if I am missing something.

As soon as I implemented a first test, I will let you know :)

Thank you very much and warm regards,

a118145
« Last Edit: August 17, 2020, 06:21:01 AM by a118145 »

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: Space and Time Dependent Boundary Conditions for Node Set
« Reply #3 on: August 17, 2020, 09:16:33 AM »
Close but not quite.  Yes edges are defined with EBOUndary, no changes needed.  But

1. Copy user/uload.f to your working directory (and add the new copy to your makefile for the executable).
2. In your mesh use the command ULOAd.  FEAP will call your uload.f with the argument 1.  You will then read your parameters; use a polling input with tinput( ).
3. program/pload.f automatically calls your uload.f every time the loads are computed with argument 2. You need to set the loads based on the coordinates.
« Last Edit: August 17, 2020, 09:27:20 AM by Prof. S. Govindjee »

a118145

  • Guest
Re: Space and Time Dependent Boundary Conditions for Node Set
« Reply #4 on: August 18, 2020, 02:43:20 AM »
Dear Professor Govindjee,

1. Copy user/uload.f to your working directory (and add the new copy to your makefile for the executable).
Somehow, I cannot find the file user/uload.f, but I reason from
2. In your mesh use the command ULOAd.  FEAP will call your uload.f with the argument 1.  You will then read your parameters; use a polling input with tinput( ).
that you mean one of the umeshX.f files, because feap recognizes these routines automatically by the name, they were given at the very beginning - in my case for example 
Code: [Select]
uct = 'ULOA'  ! ULOAd
What I do not understand is the fact, that program/pload.f automatically calls the routine uload.f (or any user defined function). I can't find the corresponding code snippet. Digging deeper into pload.f, I find that the new loads for the BCs are calculated from load tables and proportional load factors, which were initialized at the very beginning in pedgin.f (for example lines 78ff).

In short: It is not clear to me, how I can avoid an extensive code change (similar to my second post from yesterday) by making use of the present user dummy functions.

Warm regards and thank you again for your time

a118145

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: Space and Time Dependent Boundary Conditions for Node Set
« Reply #5 on: August 18, 2020, 08:00:45 AM »
Sorry just noticed you are using version 8.5.  user/uload.f was added with version 8.6.

If you want you can hack it in fairly easy to 8.5.  Copy program/pload.f to your working directory and add a call to 'uload' after the call to 'ploadl' and before the assignment of 'thn'.
This will not be a robust fix, since the code will always call 'uload' but that will get it working.  (Remember to add uload.o and pload.o to your main makefile, of course pointed to your modified files).

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Space and Time Dependent Boundary Conditions for Node Set
« Reply #6 on: August 18, 2020, 10:48:24 AM »
You can always add loads as user elements too -- this is what is done for pressure loads using the routine presld.f. You may need to have a separate mesh that coincides with the loading surface.  It may be easier than hacking your version.  It is o.k. that the load not have a tangent, you just code the p(ndf) -- be careful on signs.

a118145

  • Guest
Re: Space and Time Dependent Boundary Conditions for Node Set
« Reply #7 on: August 20, 2020, 06:28:28 AM »
Dear Professor Govindjee,
dear Professor Taylor,

I have just recognized, that there is an even simpler way to get a time and space dependent load function. As a template, I will use the slide and roll condition, which is also space and time dependent. From there, it should not be a problem to modify the function uprop accordingly.

Warm regards,

a118145