Author Topic: Programmatic Generation of Dummy Elements  (Read 5550 times)

wklausler

  • Jr. Member
  • **
  • Posts: 27
Programmatic Generation of Dummy Elements
« on: January 20, 2020, 12:29:00 AM »
Hello,

I am developing an adaptive meshing package for FEAP 8.4. For memory purposes, this requires the creation of dummy elements before the simulation. When refinement occurs during the simulation, these elements are then included in the desired region of the mesh. One part of this package should be the capability to create dummy elements in via the input file. While developing the bulk of the package, my temporary solution has been to use a loop to "manually" create elements (see attached snippet). After poking around FEAP, I've been so far unable to figure out how exactly to create elements via a user macro (presumably a umesh routine).

How can one create such dummy elements via a macro, in which only the number of desired elements needs to be specified?

Thanks in advance,
Will

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Programmatic Generation of Dummy Elements
« Reply #1 on: January 20, 2020, 12:57:30 PM »
Maybe it would be easier to use the ACTive/DEACtive option to do it. 

Not sure how you are doing the adaptivity using the dummy elements though.

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1165
Re: Programmatic Generation of Dummy Elements
« Reply #2 on: January 20, 2020, 02:53:47 PM »
If the elements for the refinement steps are known at the time of mesh input.  Activate/Deactivate is a good option.  See the manual for some details.  See also REGIons in the manual.

wklausler

  • Jr. Member
  • **
  • Posts: 27
Re: Programmatic Generation of Dummy Elements
« Reply #3 on: January 21, 2020, 01:56:25 AM »
I'm sorry, I did not sufficiently specify my goal. I want everything which takes place in the posted section of input file to instead take place within a user macro. That is, such that the user input need only be something like:

...
ADME,ALLO,num,region
...

where ADME (adaptive meshing) and ALLOcate are keywords, and 'num' and 'region' are numeric arguments specifying the number of desired dummy elements and the region into which they'd be allocated.

The suggestions using in/active regions are already implemented.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Programmatic Generation of Dummy Elements
« Reply #4 on: January 21, 2020, 08:38:10 AM »
This requires quite a lot of thought on how best to do it.  If you add elements then many of the storage arrays need to be reallocated which is very invasive into the program. 

One possible solution is to output a file containing the new mesh and restart the program.  This is used in the IgA module to refine the initial mesh up to the order and discretization needed for the analysis.


wklausler

  • Jr. Member
  • **
  • Posts: 27
Re: Programmatic Generation of Dummy Elements
« Reply #5 on: January 21, 2020, 09:21:14 AM »
The creation of dummy elements would occur during the initial meshing, right after the input of the structure, and before all solving and refining. I would like to know which subroutines are called when nodes and elements are created with via the input file.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Programmatic Generation of Dummy Elements
« Reply #6 on: January 21, 2020, 10:59:28 AM »
The input is controlled by ./program/pmesh.f

The specific routines called are identified by the command list in this routine.  For example if you are performing input of nodal coordinates with the command COOR the inputs are performed by genvec.f or if COOR ALL by pcrdrd.f

If you use other commands such as BLOCk or BLENd then different routines are used.

Note that genvec.f is also used by other inputs so any changes to this routine should be done with great caution.

Is this the information you want?

wklausler

  • Jr. Member
  • **
  • Posts: 27
Re: Programmatic Generation of Dummy Elements
« Reply #7 on: January 22, 2020, 03:13:18 AM »
Yes, this is what I was looking for. And now, after looking through the code for a while, it is apparent how tricky it would be to implement the macro I had in mind. The payoff would not be worth the effort.

Thank for the help, professor