Welcome to the forums. Please post in English or French.

You are not logged in.

#1 Re: Code_Aster usage » Why are the results different compared to Ansys/NX Nastran? » 2020-03-16 21:22:30

Johannes_ACKVA wrote:

FORCE_FACE means "force per surface". It has the dimension of a pressure. But it is not the pressure. Because a pressure per definition acts always normal to the surface, you can't change it's direction, it depends only on the surface of your model.  The Code-Aster command for  pressure is 
AFFE_CHAR_MECA(GROUP_MA='..', PRES_REP=value).

In FORCE_FACE you can specify the direction, the more complete syntax is:

AFFE_CHAR_MECA(MODELE=Model,     FORCE_FACE=(   _F(GROUP_MA='groupname',  FX=11, FY=22, FZ=33,),)

This way you can also apply a shear force on a surface. Or a force in any direction.
To get to know all syntax possibilities of Code-Aster for applying a force you can read U4.44.01

Regards
Johannes_ACKVA

Our next Code-Aster courses:

*** CODE-ASTER  DYNAMIC ANALYSIS
     19-20 March  2020
*** CODE-ASTER INTRO + CONTACT + MATERIAL
     04-08 May 2020
www.code-aster.  de

Ahh...okay. That makes more sense then.

Yeah, I read the documentation for U4.44.01 AFFE_CHAR_MECA and this is what the English translation of the documentation just states:

"The keyword factor FORCE_FACE is usable for to apply forces surface on one face of element 3D,definite component by component in the reference mark total. This face is defined by one or more meshs of the type triangle or quadrangle."

That's what is confusing.

And they also use the nomenclature of Fx, Fy, and Fz, when again, it's really force per surface.

Your explanation of it's "force per surface" makes it a lot easier to understand than what's currently in the documentation.

But again, this also means that you if you're using FORCE_FACE, that you would have to know the area of the surface that you are applying the "force" over so that you would be able to input the product of those two values into the entry field.

Thank you.

#2 Re: Code_Aster usage » Why are the results different compared to Ansys/NX Nastran? » 2020-03-16 19:40:23

Johannes_ACKVA wrote:

hello

you misunderstood the command to apply a force.    "AFFE_CHAR_MECA(  FORCE_FACE=_F(FX="  means Force per surface. Your surface is 0.2x0.2=0.04, so you applied a total force of 1*0.04=0.04. So the displacements of all 3 codes are perfectly identic. The accordance of the vMises stress is worse, but your pictures of vMises stresses show hotspots, so the max values are not realistic. You can investigate better the stresses starting to compare the stress components. A quick way to remove the hotspots (if you do not know how it is done with the preprocessor) is to set all nu to zero, so you avoid lateral contraction. For good stress results with Code-Aster you should use quadratic elements (TETRA10, HEXA20,...)

Regards
Johannes_ACKVA

Our next Code-Aster courses:

*** CODE-ASTER  DYNAMIC ANALYSIS
     19-20 March  2020
*** CODE-ASTER INTRO + CONTACT + MATERIAL
     04-08 May 2020
www.code-aster.  de

Thank you.

That's interesting that FORCE_FACE wouldn't apply to the entire face without taking the dimensions of the face into consideration.

I'm not sure that I understand why FORCE_FACE would be force*area_of_face.

I created a group of faces for the entire surface that I want to apply the 1 N to and then used FORCE_FACE on that group of faces.

Does this mean that I will always need to know what the surface area is of the face that I want to apply a FORCE_FACE to so that I can set Force_I_want = Force_of_face * Surface_Area?

Your help in educating me in regards to how FORCE_FACE works (vs. my mental model of how I thought the command works) is greatly appreciated.

Thank you.

*edit*
Does this mean that FORCE_FACE really means pressure? i.e. If I want to get an actual "force", what you're telling me is that I have to multiply the entry in Fx * Area, which means that the actual number that I am entering into the Fx field is actually a pressure.

Am I understanding that correctly?

Thank you.

#3 Code_Aster usage » Why are the results different compared to Ansys/NX Nastran? » 2020-03-16 17:57:15

alpha754293
Replies: 4

I have attached a zip file with my comm file and also a picture that shows my very simple setup, and the pictures of results from Salome/Code Aster vs. Ansys vs. NX Nastran.

Background:
I have three boxes, each of the boxes have dimensions 0.2 m x 0.2 m x 0.2 m.

The first box is located at the origin.

The second box is translated 0.2 m in the x direction (from the origin).

And the third box is translated 0.4 m in the x direction (from the origin).

I've meshed it with a max size = min size = 0.01 m.

The first box has the steel material assigned to it (E=2e11 Pa, nu=0.3, rho=7850 kg/m^3), the second box is aluminum (E=7.1e10 Pa, nu=0.33, rho=2770 kg/m^3), and the third box is made of copper (E=1.1e11 Pa, nu=0.34, rho=8300 kg/m^3).

One face that is at the origin, has the fixed constraint applied to it, and then on the opposite end - on the third box, I have a force applied to the face of 1 N in the x direction.

I've also created the group of nodes, a group of faces, and also a group of volumes.

The displacement results from Code Aster for this problem 5.6e-12 m while Ansys and NX Nastran results both showing around 1.397e-10 m.

And then looking at the unaveraged nodal von Mises stress results, Ansys shows a max approximately 71.45 Pa, NX Nastran shows 70.02 Pa, and Code Aster shows 3.9 Pa.

So, I am having a hard time, trying to understand why the results are so different and what I am doing wrong in my Code Aster model.

I would really greatly appreciate the help from the team so that I can learn from what I am doing wrong in my model.

Thank you.

#4 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-03-06 04:20:18

So I am still testing out the glued contact using my three boxes model (each box is 0.2 m x 0.2 m x 0.2 m) and the first box is made of steel, second is made of aluminum, and the third box is made of copper, with glued contacts in between each pair of boxes.

But in reviewing the results, I'm not sure I understand why the results are so different compared to Ansys and NX Nastran.

(You can see the screenshots from both Ansys, NX Nastran, and Salome Meca/Code Aster below).

I've also attached my .comm file as well.

Any help from the team is greatly appreciated so that I can try and understand why I am seeing what I am seeing.

Thank you.

#5 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-03-03 20:26:57

konyaro wrote:

In the documentation, it say that there are some fields that were calculated automatically, and that some of the dependencies of the fields would also be automatically taken care of, so I figured that by requesting those outputs that it would automatically calculate them.

I don't think it's correct, where did you read that? I think this is the case for CALC_CHAMP but not for IMPR_RESU.

For the LIAISON, you should carry out a few simple tests in order to well understand what happens. I think this would be faster than answering all questions. For instance, testing the difference between LIAISON_MAIL with and without DISTANCE and LIAISON_SOLIDE just takes a few minutes:

*link removed because I am apparently not allowed to post links*

Konyaro

You are correct sir. I read that in the documentation for CALC_CHAMP.

I didn't think that I would need to also use a CALC_CHAMP operator if I have it listed in IMPR_RESU. Apparently, I am incorrect, and thus I stand corrected.

In regards to doing the simple test, that's what I am doing now.

I've simplified the problem down to just having three boxes (0.2 m x 0.2 m x 0.2 m) in size, and I've defined the groups of faces, groups of volumes, meshed the boxes, and then created a compound mesh as advised/suggested.

On one end of all three boxes, I have a fixed constraint.

On the other end, I just have a face load of FX = 1 N.

The box that has the fixed constraint on it is made of steel (E=2e11 Pa, nu = 0.3, rho = 7850 kg/m^3), the second box in the middle is made of aluminum (E=7.1e10 Pa, nu = 0.33, rho = 2770 kg/m^3), and the last box is made of copper (E=1.1e11 Pa, nu = 0.34, rho = 8300 kg/m^3).

I'm trying to verify the results from Code_Aster in terms of maximum displacement and also maximum von Mises stress, but I am not sure if the results are correct.

My meshing parameters is a mesh size of 0.01 m.

(I'm running a cross-validation between Code_Aster, Ansys, NX Nastran, OptiStruct, Abaqus, and LS-DYNA as I am trying to learn more and more about how Code_Aster works and how it solves the FE problems.)

I figure that if I can understand how to set up a "glued" contact with three boxes, then I can create the model where I set up frictional contact using the same three boxes and then I can apply what I have learned in this simplified case to my actual model that has been shared here, so that I can solve my "real" problem that I am trying to solve.

Again, this is all to facilitate my learning how to use Code_Aster and how Code_Aster works/solves the FE problems.

Your help is greatly appreciated.

It's too bad that Jean Pierre's book doesn't use Salome Meca on purpose, because otherwise, it can be quite helpful.

Thank you.

#6 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-03-02 14:06:02

konyaro wrote:

Did you calculate these fields with CALC_CHAMP before trying to print them ?

In the documentation, it say that there are some fields that were calculated automatically, and that some of the dependencies of the fields would also be automatically taken care of, so I figured that by requesting those outputs that it would automatically calculate them.

It's confusing as to why in order to get the displacements and stress results, the displacements results request ONLY exists in IMPR_RESU whilst for the stress results, you need CALC_CHAMP first before you can call it in IMPR_RESU.

Thank you.

*edit*
I did add CALC_CHAMP afterwards.

And then another question, just to confirm -- when I am setting up the contact pairs, it says that for LIAISON_MAILLAGE that it wants the master to be volumes if the modelisation is 3D.

So if I have multiple contact pairs, then I can pick the group of volumes for the master and then the group of faces for the slave, correct?

(This is for the glued contact.)

Would I also be correct in assuming that the setup for the frictional contact will be the same in regards to the treatment of the masters and slaves?

Thank you.

(Because if I tried to use a group of volume for the master and slave, then the whole slave part will act in accordance as a slave to the master.)

#7 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-03-01 15:59:21

Sorry, another stupid question.

How do I write multiple fields to the .rmed results file so that ParaVis would be able to open all of the different field results?

Here is my code right now for the output:

IMPR_RESU(
  FORMAT='MED', 
  RESU=_F(
    NOM_CHAM=('DEPL', 'DEPL_ABSOLU', 'EPSI_ELGA', 'EPSI_ELNO', 'SIGM_ELGA', 'SIGM_ELNO'), 
    RESULTAT=reslin
  ), 
  UNITE=80
) 

I've pointed the result file to a .rmed file and set the RESU as shown above.

But when I try to open the .rmed file in ParaVis, it will only see the results for the first field, and not the rest of it.

So, what do I need to do differently in order to be able to show the rest of the files?

Do I need to write out the results into separate files?

Thank you.

#8 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-03-01 14:01:01

konyaro wrote:

Hello,
1) I don't think you can glue 2 parts with DEFI_CONTACT. I would rather use AFFE_CHAR_MECA with LIAISON_MAIL or LIAISON_SOLIDE.
2) DEFI_CONTACT with FROTTEMENT='COULOMB'.

These 2 questions are well explained in English in Jean-Pierre's book §12.

Konyaro

Yeah, I've read through Jean-Pierre's book, and between that and the code_aster documentation, it's confusing. In the preface of Jean Pierre's book, he states that he stuck with the more cumbersome method of dealing with code_aster files than using Salome/AsterStudy (which is what I am using), hence, therefore; part of the source of the confusion.

Thank you.

#9 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-03-01 05:32:49

Sorry - two more stupid questions as I am learning how to use this:

1) If I am using DEFI_CONTACT to set up my contacts, what's the keyword that I need to use/enable for a "glued" contact?

2) What would be the keyword that I would need to use for a frictional contact?

I tried looking online for tutorials in regards to multi-material, multi-body contact cases like this one and I wasn't able to find one.

Once again, your help is greatly appreciated.

Thank you.

#11 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-29 15:56:09

konyaro wrote:

The parts remain separated within a compound. A compound doesn't link and nodes/elements together, it just allows you to export several meshes at once. Just be aware of the merge nodes option (https://code-aster.org/forum2/viewtopic … 223#p61223).

So if I understand what you are saying correctly, and contrary to what Mario was saying - this should mean that I should be able to create a compound and then assign it one model for the whole thing (MECHANIQUE, 3D, TOUT=OUI), but then still define separate contacts and separate materials for it. Would my understanding be correct?

Your help is greatly appreciated.

#12 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-29 15:13:14

konyaro wrote:

Hello,
don't make things too complicated. Simply build a compound and import it with LIRE_MAILLAGE. Then all the groups are available and selectable from any commands like DEFI_CONTACT.

If you assemble the 3 meshes with 2x ASSE_MAILLAGE you won't be able to select the groups, you will have to write the names of the groups manually.

To apply different materials to a compound, define groups of elements and apply the AFFE_MATERIAU to these groups (GROUP_MA).

Konyaro

Konyaro:

But that goes exactly opposite to what Mario was saying above.

Don't I need the parts to be separate in order to be able to use DEFI_CONTACT?

Isn't that what Mario is saying above?

Thanks.

#13 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-29 04:53:09

Mario:

So I've tried to re-create the case again based on your recommendations.

The part where I am stuck now is when I am trying to create the contacts in DEFI_CONTACT, it asks for a mesh. I imported the mesh files separately and didn't create the compound, but now, when I want to select the group of element faces for the master on one part and the group of element faces for the slave on another part, it doesn't let me do that.

Again, ASSE_MAILLAGE only lets me assemble two out of the three meshes at a time. Is there a way to get around that or do I need to create the three pair-wise mesh combinations so that I will be able to define the contact between the group of element faces on the master of one part and the group of element faces on the slave of another part or how should I approach this?

You can download the latest files here:
drive [dot] google [dot] com [slash] open?id=1sE84xt0-W4c9L_wODvOrOOMkdMyV8icK

Your help is greatly appreciated.

Thank you.

#14 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-29 04:51:23

Mario:

So I've tried to re-create the case again based on your recommendations.

The part where I am stuck now is when I am trying to create the contacts in DEFI_CONTACT, it asks for a mesh. I imported the mesh files separately and didn't create the compound, but now, when I want to select the group of element faces for the master on one part and the group of element faces for the slave on another part, it doesn't let me do that.

Again, ASSE_MAILLAGE only lets me assemble two out of the three meshes at a time. Is there a way to get around that or do I need to create the three pair-wise mesh combinations so that I will be able to define the contact between the group of element faces on the master of one part and the group of element faces on the slave of another part or how should I approach this?

Your help is greatly appreciated.

Thank you.

#15 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-28 03:05:18

mf wrote:

Hello,

the 3 separate meshes are there, I know. But the group names are totally different. That's a lot of work for somebody who sees your model for the first time. I will try renaming if I have time tomorrow. Also, E is smaller then as these parts are bigger.

Would you be able to install the 2019 version? You should do that anyway, you know bugs etc....

Units: I don't know where the idea of scaling a model comes from, many new users seem to do that. I do not recommend it. 1. it creates a whole lot of additional work, 2. it may lead to wrong results if you forget anything. If you do crack analysis you will get very weird units (square roots involved)!

Impact of NL-material is in increased number of iterations for sure, and possibly problems of convergence (also more resources RAM-wise are needed).

Import of .comm: go into Asterstudy, deactivate or delete your stage and choose 'Add Stage from file'. However, you will always have to choose a new results-file in 'Output' IMPR_RESU, as your directory structure is different. So Asterstudy always deletes that from your imported .comm in advance. Also check the input of the Mesh, it should do the same here. Then it should run,

bye,

Mario.

I thought that I had responded to this, but apparently not. My apologies.

The original mesh was in three separate parts (with mm being the units of length).

And then I scaled the original mesh, about the origin, along with all of the groups, with a uniform scale factor of 0.001 in order to convert from mm to m for units of length).

And then I had created a compound because I thought that I would need to do that in order for me to create a mechanical analysis on the entire assembly, based on one of the tutorials that I watched on Youtube.

So that's how it was set up.

If it isn't correct, please feel free to correct me as I am still learning about Salome Meca and Code Aster.

The idea for scaling the model on account of units is because Ansys handles a lot of the units for you, whereas programs like Salome Meca/Code Aster are functionally unitless, and therefore; it actually makes it easier for me to ensure that the units are consistent in SI/MKS units rather than in SI/N-mm-kg (which is inconsistent units, but it's an option that Ansys gives to you as Ansys handles the units for you).

I'm only currently using Salome Meca 2018 and whatever version of Code Aster is on the system because it ships with CAE Linux 2018, and being that it's a distro where everything is configured for CAE work, out of the box, I dare not touch it, lest it will break something that was working fine before. That's my only hesitation about upgrading, otherwise, there is nothing else that would prevent me from doing so.

re: import of .comm file
Thank you. I will have to try that.

#16 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-14 03:08:51

mf wrote:

Hi,
in regards to what you want to do  (contact with friction), the .comms I posted are not correct.

To your questions:
1.) "Does it mean that if I want to create a model that has multiple materials, the AFFE_MATERIAU is to assign the material to the part?"  AFFE_MATERIAU is to assign the material(s) to the MODEL.
2.) And does this also mean that I am supposed to use AFFE_CHAR_MECA in order to "assemble" a model that has multiple parts and multiple materials together in preparation for the analysis (regardless or whether it is linear static or non-linear static)?          AFFE_CHAR_MECA are your boundary conditions (forces, displcements, temperature...), at least some of them. BTW, your model does not have multiple parts in that regard, as you used a compound in the first place. If you had imported three meshes (take a look at my example with the 3 boxes) you could have connected them with LIAISON_MAILs (those are indeed in AFFE_CHAR_MECA) or DEFI_CONTACT (ultimately you will use DEFI_CONTACT as you describe in your last post, this is separated from AFFE_CHAR_MECA).
3.) "The tutorial from Cyprien said that contact = LIAISON_MAIL, so as a result of this -- this is why I have LIAISON_MAILLAGE (contacts) because that's what I thought the French term means." LIAISON is a form of contact, but it's not always the right choice. The example of Cyprien with the glued boxes are 2 separate meshes, no compound (2 times LIRE_MAILLAGE, 1 ASSE_MAILLAGE, then he uses LIAISON_MAIL to connect them, just as I did in the 3 Box example). Just imagine a sphere on a flat surface, like in a bearing: LIAISON_MAIL between the two would also deform the part of the planar surface that is not in physical contact with the sphere. Every node of the slave moves with the master nodes. That would not be correct, this is a case for DEFI_CONTACT, especially when the surface in contact increases with applied force (the sphere on a plane is a point contact first, with increasing load it becomes a circular contact). So a LIAISON is even more than glueing when the surfaces do not match, because EVERY node of the slave has to move. Also those far away! See the sketch attached... with LIAISON you are even able to 'connect' two parts that will ALWAYS be separated from each other.
4.) Again: for modeling 'real' contact you MUST import separate meshes. A compound does not work with DEFI_CONTACT.
5.)"My thought process was that if I can get the "glued" contact to work between the three parts, then I can change it from a glued contact to a friction contact."   That's ok, but further modifications will be necessary (3 separate meshes..loads, model, materials will be the same +DEFI_CONTACT and some minor modifications to STAT_NON_LINE + FROTTEMENT)
6.)"In regards to the weak spring, would there be a way to generate a mesh from the CAD files so that I will get a conformal mesh? Or how would I know that there is a singularity?"    Yes, Salome_Meca has some very good meshing capabilities. For a nonlinear calculation, like before, I ALWAYS do a conversion of 2nd order meshes to 1str order, just to save time when building and testing the model. This conversion was not possible with your mesh. Sorry, I really don't know why. Unfortunately, singularities may have several reasons (not only problems with the mesh...insufficient or conflicting BCs are also a possibility). You would know you have a singularity, because you would not be able to get past the first iteration. Aster immediately stops with default preferences. For example: any part that is not held in place by either a DDL_IMPO, a LIAISON, a CONTACT etc and is able to move in space will cause a singularity in a static calculation. If you applied a force and a DDL_IMPO on the same node--> singularity. There are many possibilities.

Bye,

Mario.

Thank you for your very thorough and detailed explanation.

So, I don't know if you were to able to look at my original .hdf file, but in there, I actually have the original meshes for all three parts, still separated out.

And then you should see that there should be three of the same meshes, but just scaled the length units from mm to m.

And then the compound.

So, if I am understanding what you are saying correctly, it would appear that I shouldn't have used the compound (again, I picked that up from watching yet another YouTube video, which doesn't seem like it would be correct and inappropriate in my model, but I am trying to use what I am able to learn from videos and tutorials and again, I did read through Jean Pierre Aubry's tutorial, but he used Gmsh for the meshing, which is different than Salome Meca.)

Therefore; it is my understanding that if you just delete the compound from my .hdf file, then you should be able to set it up based on the desired objectives that I am trying to accomplish.

If you don't mind helping me with the set up of the files so that I can import them into Salome Meca 2018.0, so that I may learn from my mistakes, that would be greatly appreciated.

If you can show me an example of where one of the contact is "glued" and one of the contact is set up as frictional, that will also help.

And I will also state my assumption here is that the non-linear polypropylene material properties (where I have defined the function and I am using TRACTION in the material definition) shouldn't have an impact in regards to the set up of the contacts, correct?

If you can send me an example model of what the final result should look like (so that I can import it into Salome Mech 2018.0) - one with a "glued" contact and one with a "frictional" contact, then I think that I should be able to reverse engineer/figure it out from there.

Again, your help has been extremely valuable to me and for my learning purposes, so thank you!

mf wrote:

Not sure about your units.

P.S. The original mesh had length units in mm. (And since there was no other data that came in with the CGNS file, so that is the only unit that's relevant.

Once I scaled it and converted the length units from mm to m, the rest of my case set up should all be in SI/MKS units. Hope that helps. Thank you.

P.S.#2 -- Sorry - stupid question: how do I import the .comm file into Salome Meca so that I would be able to see the changes that you've made in the definition via the Aster Study GUI?

Thank you.

#17 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-13 20:47:49

mf wrote:

Hello,

it took me a while to understand your question. I modified your LHD.hdf and managed to run it with linear materials. At the moment, I am converting it to nonlinear. I hope to get it running within the next hour.

You had some minor mistakes in there. I did the following:
1) commented the functions, thus turned every material to linear. You had name conflicts in there: the DEFI_FONCTIONs and the DEFI_MATERIAU had the same names. That does not work.
2) placed the 3 materials in one AFFE_MATERIAU, as only one single material field is allowed. I guess the translation in SM is misleading as 'assign material' really means 'assign material field'. I reiterate: only one material field is allowed. I think this was your question as in your first AFFE_CHAR_MECA you only entered your 'pedal' material? Take a look at the AFFE_CHAR_MECA below in the file: at first I assign one material to the whole model. With doing this, I do not miss any group in the model which would lead to an error. All subsequent entries are related to the 2 other groups.
3) commented all LIAISON_MAILS. Why? You already have a compound...I never worked with a compound before, but the LIASIONS do not seem to work here. The cause an exception: <EXCEPTION> <CALCULEL4_55>.
3) I attached weak springs to all your face groups because I still got a singularity in the simulation even if I turned all forces off. This is a sign that something is wrong in the boundary conditions. What I did is not very elegant, but it helps (perhaps it is better to attach them to the outer surface of the housing..). The higher the stiffness of the springs the higher the influence on your calculation.

Hope it helps, I attach the .comm. Everything else is just like in your LHD.hdf,

bye

Mario.

Thank you.

Yeah, I tried looking for AFFE_CHAR_MECA, but neither the documentation nor Salome Meca was really able to give useful, English hints in regards to what it does or how it actually works.

So, to recapitulate:

Does it mean that if I want to create a model that has multiple materials, the AFFE_MATERIAU is to assign the material to the part?

And does this also mean that I am supposed to use AFFE_CHAR_MECA in order to "assemble" a model that has multiple parts and multiple materials together in preparation for the analysis (regardless or whether it is linear static or non-linear static)?

I have "LIAISON_MAILLAGE" because -- so this is my thought process (and what I am trying to model):

The model has three parts: pedal, housing, and connector.

The pedal makes contact with the housing and the connector.

The housing makes contact with the pedal and the connector.

And the connector makes contact with the pedal and the housing.

Each part has their own material (regardless of whether it's non-linear material (glass fiber filled plastics, like polypropylene, etc.) or whether it's a linear material (steel, aluminum, copper).)

The tutorial from Cyprien said that contact = LIAISON_MAILLAGE, so as a result of this -- this is why I have LIAISON_MAILLAGE (contacts) because that's what I thought the French term means.

(I thought that LIAISON_MAILLAGE means liaison mesh (mesh contact).)

What I really want to ultimately model is that the contacts between all three parts (permutatively) are actually frictional contacts, but again, per the advice from the members here, I was trying to run with linear contact first (a.k.a. a glued contact).

So...that is what I was thinking when I was setting up the model.

I hope this might help explain why things were set up the way they were.

My thought process was that if I can get the "glued" contact to work between the three parts, then I can change it from a glued contact to a friction contact.

In regards to the weak spring, would there be a way to generate a mesh from the CAD files so that I will get a conformal mesh? Or how would I know that there is a singularity?

The model that I was trying to run last night said that I should be using PROJ_CHAMP or that I should set or adjust the DISTANCE_MAX and/or DISTANCE_ALARME for the "glued" contacts. Tried that, but it still failed.

Again, your help here has been immensely beneficial.

Thank you!

#18 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-13 05:20:37

So here is what I mean by my question.

What isn't shown is different materials that are assigned to the different parts of the model, even if they're all linear, isotropic materials (metals, such as steel, aluminum, copper). The material isn't the important part.

The important part is I have different loads and different contacts set up. (I also tried to simplify this by only creating one LIAISON_MAILLAGE where I set the master as the pedal and the slaves as the housing and the connector (all of them are group of volumes meshes).

Even with that, I am having difficulties running this.

When I created the mesh in Ansys, I didn't set up the shared topology option, so I think that in the message file, it's saying about PROJ_CHAMP, but I don't really understand what it is saying.

In either case, here is what the screenshot looks like:

Going back to my original question -- how do I create a static analysis with the multiple parts which has different materials?

Thank you.

#19 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-12 23:09:27

So...in the .hdf file, you will see two copies of the meshes -- the original import which is CGNS export from Ansys (with the units of length = mm) (as I had troubles meshing the actual, underlying CAD files, which I will have to look into some other time), and then a scaled version of it so that I will be able to use SI/MKS system all around so the meshes were scaled, as a copy, with a scale factor of 0.001.

Everything was then made consistent with SI/MKS units in order to simplify things a little bit for me since my original model, built in Ansys, was using N-mm-kg, which of course, is an inconsistent unit system, but Ansys takes care of the units conversions internally, so it's a little more "forgiving" in that regard. Knowing that and knowing that Salome Meca/Code Aster is either unitless (e.g. the user has to maintain consistent units) and/or is SI/MKS, I figured that I would make my life simple by scaling the original mesh, but leaving the original mesh in in case the face groups didn't scale properly. (Which, it seems to have scaled just fine).

So...that's what I did with that, and hopefully that helps explains some stuff.

In my latest run, I also took the advice of setting up only glued contacts and linear materials.

But again, my question is even if I were to use all linear materials (let's say one part is steel, one part is aluminum, and one part is copper), my question still remains in regards to how would I select the model or the mesh to apply the loads (and the contact loads) if I can only pick one mesh at a time?

(When I get home, I'll have to show you what that looks like.)

Thank you.

#20 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-11 06:21:24

Attached is also my current case in Aster_Study in Salome Meca.

I am not sure if saving the .hdf file will also save the current progress in Aster_Study, so I've attached the .comm file and my .export file for my current case in the .tar.gz file.

(For my .hdf file, due to its size, I used 7-zip because I can usually get a higher level of compression with that than with .tar.gz.)

Again, thank you everybody, in advance, for helping me learn Salome Meca and Code Aster.

It is greatly appreciated.

#21 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-11 06:16:03

mecour wrote:

hello,

you have many option how to work with that. You can use ASSE_MAILLAGE more times. You can create compound or partition of that three parts and create groups on mesh and than assign to every group different material.

These are quite beginers problems. I recomend you book from Jean Pierre Aubry,
framabook.org/docs/Code_Aster/beginning_with_code_aster-jp_aubry-20190129.pdf

Thank you.

This tutorial/guide was quite helpful.

mf wrote:

Hey there,

well this is correct, there is sometimes more than one way to do stuff in Aster. I understand what you want to do. Let me answer chronologically, reading your post:
1.) of course you can assemble more than one mesh in Aster/Asterstudy: for assembling N meshes you have to use (N-1) ASSE_MAILLAGE. This is what I would do now, having read your post. Forget about the compound in Salome for now. This way you are much more flexible in ASTER/ASTERSTUDY.
2.) Forget about your nonlinear material for now. It may introduce problems of its own. I don't know about your nonlinearities, but keep it linear in your first examples (only E and NU). More complexity can be added later, it happens on its own as you progress.
3.) I attached a neat little .hdf, which you can open in Salome-Meca. As we are not allowed to post bigger files, I had to remove the results. It is a model consisting of three cubes on top of each other with three LINEAR materials. I used LIAISON_MAIL to glue them together (coming from the fixed surface FIX in BOX1 which is the master in the first LIAISON, I glued the NODES of the adjacent surface as a slave to it). MAITRE=MASTER, ESCLAVE=SLAVE. Any keyword ending with _MA is a MESH, _NO are NODES. I repeated that with BOX2 and BOX3. If I had glued the whole BOX2 to BOX1, it would have stiffened BOX2 as all nodes have to follow (Try that also, the result would not be 'correct'!)! The applied force is a FORCE_FACE therefore its unit is force/area (N/mm²=MPa in this model). ENCASTRE means 'embedded' or 'built into'. It is the same as setting all DXi and DRXi=0, thus fixing this surface named 'FIX'. MECA_STATIQUE cannot be used with nonlinear materials, you will have to change to STAT_NON_LINE later.
You will have to change the directory of the output-file to your directory (IMPR_RESU at the end). Other changes should not be necessary to run this little model.
4.) Run it (it is small, so no changes necessary there, should only take a few seconds). ncpus=3 because my machine has 6 cores (MUMPS, the solver, is fastest if ncpus = NCORES/2. I have no idea why...)
5.) open the result in ParaVis. Take a look at the created result and the components. With 'generate vectors' and a 'Common-->WarpByVector' you will be able to see the deformation. DEPL=deplacement (displacement), VMIS=VonMisesStress,...Take a look at CREA_CHAMP which keywords (SIEF_XXXX, SIEQ_XXXX, EPSI_XXXX) created these results (for example all SIEQ_XXXX results create the components VMIS, TRESCA, PRIN_1 and so on..). Consider reading the ASTER documentation of the used commands AFFE_CHAR_MECA, MECA_STATIQUE,....

If you are not sure what happens, create small examples (this my test example nr. 15..) that do what you want and take only seconds to calculate. Otherwise it takes too long and increases frustration (been there..).

The book of Jean Pierre Aubry is indeed VERY helpful, read it and try to understand how ASTER works. It has it's special moments and logic, but it is one of the best tools out there. I use it since 7-8 months and I have not been a calculating engineer before (as a materials scientist I had a seminar in abaqus 15 years ago :-) ...if I can do it, anybody can). If you use it the 'right' way, it is VERY powerful. Bear in mind that it is certified for nuclear applications in France, so if you apply the correct commands your results won't differ much.

Apply this example to your model until it works with linear materials (apply the ASTER commands to your meshes and groups..). Then change to nonlinear...you will have to modify the materials, define a few functions for your materials definition and the simulation time in STAT_NON_LINE (DEFI_FONCTION..) and of course change to STAT_NON_LINE.....

You are on a Linux machine, right? If not, change to Linux (my best advice today),

cheers,

Mario.

Mario:

Thank you to you as well.

Unforunately, I wasn't able to open your .hdf file.

I'm not sure if it is because you created it with a newer version of Salome Meca? I'm currently still using Salome Meca 2018 and it said that it couldn't read your file in. (I had to use Task Manager to terminate the session otherwise it wouldn't go away because it would keep trying to read your .hdf file in "fail safe" mode.)

Yes, I'm on a Linux system. It's currently running CAE Linux 2018 which is built on top of Xubuntu 16.04 LTS.

It's working, so I'm not going to touch it.

So I followed mecour's link to the book by Jean Pierre Aubry and now, my question is - I'm about to set up the linear analysis -- so without the non-linear contacts (and I agree with you -- that adding the non-linear contacts adds another layer of complexity to the problem, so I'll look to doing that after).

My question now is my model has three different parts, made from three different material.

I've defined the non-linear materials by defining the function with EPSI, and SIGMA as my coordinates, along with their linear isotropic properties, E, nu, and rho, and "TRACTION". I then assigned them to my parts.

Now I am at the step where I am able to define the linear static analysis (as I am currently using only glued contacts, LIAISON_MALLIAGE) but when I get to the part where I have to define the loads on the model, (I also have a compound_mesh consisting of all three parts, but because the materials are assigned per part), where I go to select which loads apply, I'm stuck in terms of how I would be defining the linear static analysis with all of the parts and the contact loads and my fixed and applied load BCs.

I've uploaded my .hdf (and associated files) here, on my Google drive:

drive [dot] google [dot] com [slash] open?id=1HXuGQvvW1XRU2j2ab0tcFZgDRV6Ukiak

Any help in regards to how I can set up the static linear analysis model when the model consists of multiple parts and multiple materials would be greatly appreciated.

re: MUMPs
In the tutorial that I followed from the Youtube link that I have previously provided -- I managed to figure a way to get the MPI working using ASTK and found that for some reason, at least so far, with that model, using OpenMP is actually faster than using MPI.

METIS partitioning, for me, for some reason, didn't/wouldn't work, so I had to use SCOTCH instead. (But this isn't the emphasis of this discussion, so I can certainly start another thread if the group thinks that it warrants and merits a discussion, in a separate thread -- because if so, I can certainly start that thread.)

But right now, I am still learning and I am trying to figure out how to set up the linear static analysis when you have multiple parts with multiple materials.

Again, your help is greatly appreciated.

Thank you.

#22 Re: Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-04 04:15:13

mf wrote:

Hello,

you have 3 .med files and want to merge them into one file? In this case:
-)import all 3 in the mesh module of Salome
-)highlight all 3 and choose Mesh--Build Compound
-)export the .med-file or do whatever you want with it.

Be careful if you already have groups defined in those 3 initial meshes.

You can also assemble meshes in Aster, but I guess that is not your question?

Regards,

Mario.

Mario:

Thank you.

Well, I originally tried to do it using ASSE_MAILLAGE, but that option only allows me to assemble two meshes together, not three.

But I think that this compound method works.

I'll have to play around with it because my model consists of three parts and each part will have a different non-linear material assigned to it, so I'm still trying to figure out how to do that.

Like I want to "assemble" (or "compound") the meshes together so that when I create the model definition, I will be able to apply and assign it to all three meshes at the same time.

But what I am unsure of at the moment (again, I still have to try the compound method), is when I go to create my non-linear material (which I am still learning and trying to figure out how to do), what I am not sure of is if I compound the meshes together, will I still be able to assign the three different non-linear materials to the three different parts that's in my model.

That, I'm not so sure of.

If you have or are able to point me to the references, resources, and/or documentation that might be able to help provide a tutorial of sorts in regards to how to do accomplish what I am trying to accomplish here, including creating the non-linear material, that would be greatly appreciated.

I'm still in the process of learning Salome Meca and Code Aster and I am trying to convert one of my old Ansys models and rebuild it in Salome Meca/Code Aster so that I can learn how both programs run.

Your help in trying to guide me through this "model conversion" process is greatly appreciated.

Thank you.

P.S. Yes, I realized what happens with the groups that were defined in my original mesh. (The original mesh is a CGNS export from Ansys, and in Ansys, yes, I do have named selections (which comes in as group of faces) defined. And yes, I realise that pretty much everything in Salome Meca/Code Aster appears to have an 8 character limit, so I now have a LibreOffice Calc file that I am using to track all of the names from what it originally was (with longer names than 8 characters) and its conversion to the shorter names that is only a maximum of 8 characters long. Yes, I already ran into that.)

P.S. #2 This was the Youtube video that somebody else made about compounds, that someone else had already pointed me to, so that's where I am learning and testing out this whole "compound" thing - what it can do and how it works and the downstream implications (re: creating and assigning non-linear materials to my parts):

www [dot] youtube [dot] com [slash] watch?v=EcA5I9orOCg

Thank you.

#23 Code_Aster usage » How do I assemble three meshes together into one? » 2020-02-02 20:16:00

alpha754293
Replies: 34

If I have an assembly which consists of three meshes, how do I assemble them into a single mesh?

#24 Re: Code_Aster usage » Unknown key words: identifier » 2020-02-01 05:04:44

So here is how I fixed this:

Instead of copying the .comm file from the RunCase from the AsterStudy module in Salome Meca, I exported the case, which wrote out the .comm file without the "identifier" key word.

I then used the Code Aster Wizard which comes with CAE Linux 2018 to set up the directory and then I would delete the entry pointing to the single .med mesh file and then add in the my two mesh files for the two boxes as separate line items, assign the logical unit number properly, and leave everything else that the Code Aster Wizard sets up intact.

I did have to set the solver to MUMPS and the partitioner to SCOTCH for it to work, but Code Aster MPI is working now for me.

Thank you.

#25 Re: Code_Aster usage » Error - Le fichier de nom fort.99.part.8 associé à l'unité logique ?? » 2020-02-01 05:00:47

I think that this corrected the issue:

I changed the partitioning method from METIS to SCOTCH in:

model = AFFE_MODELE(AFFE=_F(MODELISATION=('3D', ),
                            PHENOMENE='MECANIQUE',
                            TOUT='OUI'),
                    DISTRIBUTION=_F(PARTITIONNEUR='SCOTCH'),
                    MAILLAGE=mesh)

Hopefully this might be of use for someone else in the future.

Not sure why METIS failed, but SCOTCH worked, so I'll go with that.