KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.03k stars 245 forks source link

Issues using periodic boundary conditions #5048

Closed marandra closed 1 year ago

marandra commented 5 years ago

I am trying to use periodic periodic boundary conditions via the apply_periodic_condition_process for the first time, and I am not getting the results that I expect.

I may have a problem with the setup of the case, so I have attached a minimal working example of a case that use the these conditions. The first figure shows the displacements obtained with the process, and in the second one the results with other routine written by @RiccardoRossi , which I think are correct.

In the example I am applying a displacement in the center nodes of the z-faces in x-direction. The results that I obtain in this (and all) cases is that the nodes of a set of x, y, and z edges just keep fixed.

Any ideas?

mwe_pbc_process.zip

pbc_process pbc_process-good

loumalouomega commented 5 years ago

@marandra which is the routine which you mean?

adityaghantasala commented 5 years ago

@marandra I am having a look on the case you posted. I will let you know !

marandra commented 5 years ago

@adityaghantasala thanks! @loumalouomega , it is rve_periodicity_utility, for which I created an ad-hoc analysis which calls it similarly to how it is done in rve_analysis.py. The rve_periodicity_utility assumes the model part is a cuboid with parallel faces, computes the face-pairs from a given skin, and solve the circular dependencies of dofs that arise when imposing periodic bcs.

marandra commented 5 years ago

Hi @adityaghantasala Please remember to take a look at the case when you have a chance. Thanks.

adityaghantasala commented 5 years ago

@marandra sorry for late reply, can you post the case using rve_periodic_utility too ?! Thank you.

marandra commented 5 years ago

Sure, here you are: mwe_pbc_utility.zip (you'll need to copy periodic_bc_structural_analysys.py to python_scripts directory of StructuralMechanicsApplication.)

Note that in this case I need to specify a pinned node to avoid translation. If I do specify it in the previous case, the solution does not converge.

Let me know if you need anything else. Thanks!

adityaghantasala commented 5 years ago

perfect thank you !

adityaghantasala commented 5 years ago

I think I have found the reason. This is related to the corner nodes (which here are all except 2 nodes). The periodic boundary process has not a mechanism to handle them. In the next hours I will think of a solution and post here.

The RVE utility is taking care of these as it has the information about all the possible combinations of the periodic condition.

adityaghantasala commented 5 years ago

node_num

Consider the above node numbering from the example you posted. RVE utility connects the following nodes explicitly (in total 42) :

(slave and master) 17 and 9 18 and 9 7 and 15 1 and 9 2 and 9

which are not possible with the periodic bc process. On the other hand the Periodic bc process will create connections like this (because of the order of master and slave model parts, and the corner nodes ) with this process more than 42 : (slave to master) 9 to 1 1 to 10 1 to 2 14 to 2

in the above combinations 10 to 9 is established via 9 to 1 and 1 to 10. But with periodic bc process ,at the same time 1 is also connected to 2. This is because they are corner nodes. This is the reason why the process is not working for this case. I am having a more deep work in the rve utility to how the unique set of constraints (connections) are made to introduce them into the periodic bc process.

marandra commented 3 years ago

Hi @adityaghantasala , here rebumping the issue.

I've been doing fine with the utility so far, but I would like to give the process another try, as it is more flexible for my application. If I understand correctly, the issue is that the process is not automatically establishing some connections between corner nodes, and maybe also between side nodes. Does it requires some ad-hoc steps? Do you think it is possible to fix it?

rubenzorrilla commented 1 year ago

Closing as current version of the RVE process already takes care of the corner nodes. @adityaghantasala @marandra feel free to reopen as required.