Default internal boundary conditions

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Default internal boundary conditions

randress
This post was updated on .
In another post (http://forum.featool.com/Multi-boundary-selection-tp886p887.html)
Precise Simulation wrote
However, the "Continuity" condition should be the default boundary condition for internal boundaries and should not need to be selected manually.
This does not seem to always be the case. I have encountered DC Conductive Media problems where the default internal boundaries is a mixed bag. For example:

default_boundary_conditions.fea

Where the default boundary conditions for the internal boundaries (1-108) are mostly "Continuity" but about 25 of them are "Flux discontinuity":
>> fea.phys.dc.bdr.sel

ans =

  Columns 1 through 12

    -2    -2    -2    -1    -2    -2    -2    -1    -1    -2    -2    -1

  Columns 13 through 24

    -1    -1    -1    -2    -1    -2    -1    -2    -2    -2    -2    -1

  Columns 25 through 36

    -1    -1    -2    -2    -1    -2    -2    -2    -2    -1    -1    -2

  Columns 37 through 48

    -2    -2    -2    -2    -2    -2    -2    -1    -1    -1    -1    -1

  Columns 49 through 60

    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1

  Columns 61 through 72

    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1

  Columns 73 through 84

    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1

  Columns 85 through 96

    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1

  Columns 97 through 108

    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1

  Columns 109 through 114 (external boundaries)

     2     2     2     2     2     2

1.  Can this be corrected so that all internal boundaries are set to "Continuity"?

Or...

2.  If the fea is exported to MATLAB where fea.phys.dc.bdr.sel can be set as desired (1-108 set to "-1" in this case), how could it be imported back to featool for continued processing?  Or is this another of my bad ideas :-) ?

Kind regards,
Randal

Reply | Threaded
Open this post in threaded view
|

Re: Default internal boundary conditions

Precise Simulation
Administrator
It might be a bug but I would need a clear test case to reproduce the issue. The simple test cases I've tried seem to work as expected, but your model contains so many components and history so it is not really possible to say where something could have gone wrong.
Reply | Threaded
Open this post in threaded view
|

Re: Default internal boundary conditions

randress
Precise Simulation wrote
It might be a bug but I would need a clear test case to reproduce the issue.
Fair enough.  Everything I tried had at least one (or one additional in the case of 2a & 2b) "Flux discontinuity". I only tried multiple (though nonsensical) objects inside a block.

Case1 and Case 2 are independent (start from new model). Case2a and Case2b are continuations of Case2 (Case2a began with Case2 and Case2b began with Case2a.  I only dumped fea.phys.dc.bdr.sel for Case1 and Case2b.

case1.fea
case1.fes
case1.m

case1
>> fea.phys.dc.bdr.sel

ans =

  Columns 1 through 12

    -2    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1

  Columns 13 through 22

    -1    -1    -1    -1     2     2     1     2     1     2

Case2
case2.fea
case2.fes
case2.m

Case2a

case2a.fea
case2a.fes
case2a.m

Case2b

case2b.fea
case2b.fes
case2b.m

>> fea.phys.dc.bdr.sel

ans =

  Columns 1 through 12

    -2    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1     1

  Columns 13 through 24

     2     2     2     2     1    -1    -1    -2    -2    -2    -2    -1

  Columns 25 through 36

    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1

  Columns 37 through 38

    -1    -1

Thanks for taking a look at it.

Kind regards,
Randal
Reply | Threaded
Open this post in threaded view
|

Re: Default internal boundary conditions

Precise Simulation
Administrator
Thank you for the test cases. I will try to fix it when I get a chance, this will however only be able to affect new models, models with existing defined boundary conditions will not be affected. In this case you can still change them manually as you have been doing, optionally apply the multi-select workaround I described in your previous post on this issue, or load a .fea model file into the Matlab workspace, modify/change, and save it back before loading it into the FEATool GUI, for example:

  load path_to_my_model.fea -mat
  % ... make valid changes to the fea struct
  save path_to_my_changed_model.fea fea -v7
Reply | Threaded
Open this post in threaded view
|

Re: Default internal boundary conditions

randress
Precise Simulation wrote
Thank you for the test cases.
More than happy to, when I can :-)

Precise Simulation wrote
I will try to fix it when I get a chance,
The workaround's are quite adequate in the meantime.  My main concern is that some future situation (with hundreds of internal boundaries) might prove onerous.  I am especially fond of the "load/modify/save" path that you outlined.  I was wondering how to get fea changes made in the MATLAB workspace into FEATool proper.  Thanks!

BTW, this (load/modify/save) seems to indicate that I could save problems (or parts such as  fea.geom) as variables from the MATLAB workspace using "export", whether placed there from a ".fea" file using the "load" command or using the FEATool File menu "Export FEA struct to MATLAB" option.   For some reason (my lack of organization :-) I am having trouble keeping up with my work.  I have been trying to use file/directory structure and it is not working very well - this gives me another tool (or just another place to make a mess :-)))

Thanks for your support,
Randal
Reply | Threaded
Open this post in threaded view
|

Re: Default internal boundary conditions

Precise Simulation
Administrator
I have released an update (1.13 Build 20.11.324) which I think will address this issue. All external boundaries will now be sequentially ordered and numbered before the internal ones, so in this case any .fes or .m script files using internal boundaries will most likely have to be edited manually to fix the boundary reordering (bindary .fea models should remain unaffected since the "incorrect" boundary numbering is stored in the model file, in contrast to script files. Please do report if you still encounter incorrectly default set internal boundaries (which should always be continuity equivalent to homogenous Neumann/zero flux BCs).