CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   FSI: Establishment of the initial stress state (https://www.cfd-online.com/Forums/cfx/99750-fsi-establishment-initial-stress-state.html)

Jernej Pirnar April 10, 2012 18:32

FSI: Establishment of the initial stress state
 
Hi all,

I am interested in Fluid Structure Interaction and I am trying to simulate dynamics of flexible tube in the case of the interior air flow. I use Ansys software package (CFX + Ansys Mechanical APDL).
Let me first briefly introduce my approach.
  • Originally cylindrical shaped tube is stretched to get deformed shape. FE model of the deformed tube is exported and it is the basis for creating fluid mesh in ICEM CFD. Output elastic strain (EPEL) is saved via the INISTATE,WRITE command and applied later to prestress the model.
  • The deformed tube FE model is imported back into Ansys Mechanical APDL, where the new constraints, fluid-solid interface and MFX setup are defined for the additional FSI (2-way) simulation. Also the initial stress state (imported FE deformed model do not have any stress state), based on the previous static structural analysis is established. Structural part of the FSI simulation (transient) setup is written (MFWR) in the .inp file.
  • Fluid mesh is made with ICEM CFD as mentioned. Fluid part of the FSI simulation setup is made in CFX-Pre, and the CFX definition .def file is written.

Definition of the fluid side part of the simulation is made without any problem, but I get stuck with the structural part, when I try to apply the prestress (INISTATE,READ) obtained in the previous static structural analysis. I have already done the FSI simulation without initial stress applied and it has been finished successfully. So, obviously prestressing is the cause the solution fails (in the very first coupling step). Ansys.err file states that the structure FE mesh becomes highly distorted, what is confirmed, when the .rst file is checked. In the initial state file .ist I write only Output elastic strain (EPEL), since the linear elasticity material model is used. Initial state data is written in the Global cartesian coordinate system (INISTATE,WRITE,1,,,,0,EPEL). SOLID186 element type is used and it supports the application of the INISTATE command.

Does anybody have some experience and can give some advice on the topic I described?

Thanks in advance.

Jernej

stumpy April 11, 2012 10:35

The recommended approach is to treat this as FSI from the start. So perform an FSI analysis to pre-stress the tube, then restart this analysis to continue with the rest of the simulation. During the pre-stressing stage the fluid side should receive displacements, but there's no need to send forces. When you perform the restart you can enable sending of forces. If you use this approach you don't need to worry about using INISTATE, etc. The fluid and structural mesh would both start from the unstressed geometry.

If you want to continue with your approach then I think you need to look at the deformations passed to CFX. When you restart the MAPDL side it must be starting from zero deformation, since it is the deformations that are passed to CFX, not the absolute coordinate position. You can use UPCOORD to reset the deformations to zero while retaining the stresses and the absolute mesh position.

Jernej Pirnar April 11, 2012 19:09

Stumpy, thank you for your response. I really appreciate it.
For now I will continue with the approach I have described. I have found out during some simple tests that the initial stress state can be correctly applied only if all structural DOF are fixed, which means the geometry cannot be distorted because any movement is prevented.
So, when the initial strain field is applied the stress field is calculated as desired what the tests also confirm.

In view of this finding my next step will be to set-up a steady-state FSI analysis to apply initial stress state and then restart it. In the initial steady-state FSI run fluid side would not send any forces to the structural side.
In fact this would be some “initialization” step of the FSI run. During the restart, the analysis will be switched to transient and also new constraints will be applied.

It sounds it should work, but I will see tomorrow morning.
I am aware this procedure is pretty complicated but what else can be done, when the structural deformation is very large prior the “real” FSI run is even started and the CFX-Solver does not provide direct remeshing to start with the satisfactory fluid mesh quality.
Up to the present I have found a lot of useful information on this forum so I have decided to report how my work is making progress to help whomever find it useful.

Jernej

MainzerKaiser April 20, 2012 09:13

I try to follow the same procedure for quite some time.

Is it true, that the mesh of your deformed tube has to be the same one, when initializing the FSI with the inistate,read command?

When you have a tube, did you try to use shell elements instead of solids?


Myself, I work one a moving flap in a tube. I try to deform the thin (shell) flap prior to the FSI, but I struggle with the inistate commands... :(

Jernej Pirnar April 20, 2012 17:43

I had also been struggling with the inistate commands until yesterday when I have finally broke through.

I start with the already deformed FE tube model. It is obtained in the static structural analysis and later exported. I also write the output elastic strain field in the .ist file at the end of the mentioned analysis.

So, at this point, the FSI analysis setup is started. I write .inp file manually.
First the deformed FE model is imported and the appropriate BCs are applied (in the static structural analysis the displacements were applied to stretch the tube; on the deformed model all the displacements at the tube ends are set to zero).
The structural part of the analysis is set-up to transient with the time integration effects turned off.
Large deformations are also turned off, because in this first step when the prestress is applied, the tube is not expected to anyhow deform.
Prior the SOLVE command the INISTATE,READ command is used. After the SOLVE command I apply the UPCOORD command as stumpy has suggested in the post above.
The fluid part is set to steady-state. I also turn off the force exchange between the solvers, so the displacements are the only one allowed to pass between them.


The second part is to restart the above analysis and set it as fully transient two-way. Time integration effects are turned on as well as large deformations.
Also the force exchange between the solvers is allowed. Fluid side setup is changed to transient and the previous steady-state solution is used to initialise the flow field.


So far the procedure works fine and the initial stress is applied as desired. Results confirm this statement. I have not tried with the shell elements yet, but I am going to try to see if there is any influence to the results.

Hope it helps.

Jernej

MainzerKaiser April 21, 2012 11:00

Quote:

I start with the already deformed FE tube model. It is obtained in the static structural analysis and later exported.
..
First the deformed FE model is imported ...
How do You do this exactly?

My procedure is like in the tutorial about the hot/cold blade that is deformed for a subsequent modal analysis. That means, there is the StaticStructural>APDLCommandField>FEModeler>ModalA nalysis(Modelpart, which replaces Geometry)
My problem is, that the units in the FE Modeler do not match the real units prior in the StaticStructural. Thus, when I import the deformed geometry from the FE Modeler, I cannot mesh my goemetry in the StaticStructural, which is the one part of my FSI! There is a 1000 times bigger geometry that is not meshable. Even in the tutorial the units go crazy from mm to m but with not consistent numbers. Very strange, I cannot imagine that they really do a Modal Analysis on a 1000times bigger blade...
Btw, RightClick on FEModeler and Change of Units in the Properties do not work. This option does not appear, although I have it seen some weeks ago. The project units are set on SI!

What do I do wrong?


Quote:

After the SOLVE command I apply the UPCOORD command...
Why do You do this? Upcoord saves the goemetry, doesnt it?

It would help me alot if you could post the last parts of you *ds files, which inhibit all of your apdl commands, here in this thread!

That would be great!!

Thx,
MK

Jernej Pirnar April 22, 2012 13:23

I gather from what you wrote that you are using the WB Platform. Unfortunately I have no experience with it or with the FE Modeler.
As I said, at first the static structural analysis is made (I use ANSYS Classic), where the deformed FE model mesh and initial state data is obtained.
Then comes the setup for the structural part of the FSI analysis (steady-state) where the prestress is applied. The input .inp file:

/units,si
!---------GEOMETRY INPUT-------------
cdread,db,/.../.../deformed_mesh,cdb !Import deformed structural mesh (without any stress state!) obtained in the static structural analysis
!--------SOLVER SETUP AND B.C. DEFINITION---------
/solu
antype,4 !Analysis is set to transient with the time integration effects turned off
timint,off
time,1
nsubst,10,30,2
nlgeom,off
inistate,read,file,ist,/.../.../ !Initial strain data are read (.ist file is obtained in the previous static structural analysis)
cmsel,s,z1
cmsel,a,z2
d,all,all !Both end of the tube are fixed and not able to move in any direction
!
cmsel,s,interface
sf,all,fsin,1 !Fluid-structure interface is defined
allsel,all
!--------MFX SETUP-------
mfanalysis,on
mfpsimul,group1,ANSYS
mfpsimul,group2,CFX
mfsorder,group1,group2
!
mfdtime,1,1,1
mftime,1
!
mflc,surf,ANSYS,1,DISP,CFX,Interface,'Total Mesh Displacement',nonc
!
mfconv,all,0.01
mfiter,10,2,5
mfrelax,all,0.75
!
mfoutput,all
mfrc,1
!
/gst,on,on
allsel,all
solve
upcoord,-1,on
save
finish


Then the restart is made:

/units,si
!---------RESUME PREVIOUS RUN DATABASE-------------
resume,/.../.../ANSYS,db !Resume previous steady-state FSI run database
!---------ANSYS SOLVER SETUP------------
/solu
antype,4
timint,on !Transient effects are turned on
time,5
deltim,0.01,0.01,0.01
nlgeom,on
!--------MFX SETUP-------
mfdtime,0.01,0.01,0.01
mftime,5
!
mflc,surf,ANSYS,1,DISP,CFX,Interface,'Total Mesh Displacement',nonc
mflc,surf,CFX,Interface,'Total Force',ANSYS,1,FORC,cpp
!
mfoutput,all
mfrc,20,5
!
mfrs,1 !Time for the restart is defined (end time of the previous run)
!
/gst,on,on
allsel,all
solve
save
finish


As I underestand UPCOORD resets the displacements, i.e. all displacements, after the UPCOORD command is given, are set to zero if the factor is set to -1.

MainzerKaiser April 26, 2012 12:36

Hi,
Thank You very much for you ds.dat/ds.inp file, that was a great input for me!!!


I could solve my problem with the import of the deformed geometry.
Nevertheless I struggle with the import of the initial stresses. I use the following inistate commands:

inistate,write,1,,,,-2,s,epel
inistate,read,file,ist,/worklocal/***/FSI_unit_korrektur_files/dp0/SYS-3/MECH/ ! btw, is the absolute path correct? or '/work .. ?

The first command is given in the setup of the pureFEM part, which deforms my structure. The second one is given as a APDL command in the structural part of the FSI.
In the context of the workbench, where do I have to put the upcoord,-1,on command? I included it in the ds.dat file after the solve line, which is transferred from the structural part to the CFX in the FSI setting. Thus, it is the ds.dat file in the SYS-? directory of the structural part of the FSI. I am not sure if the upcoord command really considered in the FSI part. The command does not appear later on in the ANSYS.mf file!! Why is that?


Regarding your restart settings- do you originally want to do transient simulations or did you chose that option over steady state because of the inistate and upcoord problems?
In the end, I want to solve a steady state FSI problem.

I tried to restart a FSI, in which only the displacement are exhanged. The restarted FSI with displacement and fluid forces does still not have any internal stesses in the structure.




Apart from that, I would like to monitor the max. Value of the vonMises Stresses in the structural part in order to check right away if the file.ist is loaded or if there are the right values. But in CFX I have only access to the fluid part, right?

MainzerKaiser April 27, 2012 06:34

I recognized a mistake in my inistate command:
inistate,write,1,,,,-2,s,epel
It has to be
inistate,write,1,,,,-2,epel
I cannot write stresses and strains at the same time. Only strains are important.

Nevertheless, the new file.ist is also not loaded in the FSI Simulation...

:confused:

Or in other words, as the ANSYS.stdout tells me that the Stress file is loaded, but it has no effect on my deformed structure!!
What does the subsequent IF then else lines tell me?

SUCCESSFULLY READ THE INITIAL STRESS FILE


CALCULATE PRESTRESS EFFECTS FOR A SUBSEQUENT PRESTRESSED ANALYSIS

*GET ANSINTER_ FROM ACTI ITEM=INT VALUE= 0.00000000

*IF ANSINTER_ ( = 0.00000 ) NE
0 ( = 0.00000 ) THEN

*ENDIF

Jernej Pirnar April 30, 2012 19:22

Hi,

I am glad it was helpful.
I use the steady-state solution in purpose to “initialise” the further transient analysis. I also use the results in order to check if the initial state data is suitably applied.
Besides, I am going to try to apply the initial state data directly in the transient analysis, without obtaining steady-state solution first.

Concerning the solution monitoring at the structural side I think you could use the NLHIST command. In the CFX-Pre you can access only the fluid part as you wrote.
I haven't used it yet, so I am not really sure, but it is worth to try. Look in the Ansys Command Reference Guide for more details about it.

I have recently made some tests where I replaced solid elements with the shells and it has turned out the shells are more appropriate to use for the structural model I have.
The INISTATE command also works fine.
In my previous post, if you look at the first input file where the initial strain data is applied, the large deflection effects are turned off in order to correctly prestress the structure; but this is not the case when the shells are used.
In this case the large deflection effect must be turned on otherwise the results are not adequate. I haven’t found the answer yet, why the difference.
Next thing I have observed is that some small distortions of the FE model appear when the initial strain data is applied.
I was told by the support the cause is probably the interpolation method and the final results should not be affected. In fact, there appear some minor differences in stress field comparing to the results from the static structural analysis but they are really negligible.
Do you also notice this kind of behaviour ?

Furthermore, I have also found out that if the UPCOORD is skipped the procedure works well, so I think you could try to proceed without it.
The output states the initial state data was read successfully. I think the second row tells that the prestress effects are calculated or included (PSTRES command).
Regarding the rest of the output text I believe it has no connection with the applying the initial data. I am not sure but I think that the *GET command retrieves the value of the current interactive key (ITEM=INT) and stores it in the parameter ANSINTER.
Value of 0 means that the current interactive key is off. Then in the *IF statement the program compares value stored in the ANSINTER parameter with the value of 0 and if they are not equal (NE) the rest of the code is executed (it comes after THAN and it is blank; calculation terminates).


Regards,

Jernej

MainzerKaiser May 1, 2012 09:48

By now, I was able to check whether inistate really loads the file.ist. With "inistate,list" you can see, which data from the file.ist is loaded. If it does not work, it tells you that for some or all elements the strain data could not be identified or loaded although it claims "SUCCESSFULLY READ THE INITIAL STRESS FILE "
That was actually the case when I posted my last answer.


The biggest problem I have is to keep consistent units from the first static structural to finite element modeler to the FSI Static Structural... One command (could be the cdwrite, upcoord...) divides every dimension by 1000.
If I rebuild the complete setup in the workbench, then it is easier. I could work it through one time before I lost alot of data due to a crash of the project file :(

Quote:

Originally Posted by Jernej Pirnar (Post 358548)

Next thing I have observed is that some small distortions of the FE model appear when the initial strain data is applied.
I was told by the support the cause is probably the interpolation method and the final results should not be affected. In fact, there appear some minor differences in stress field comparing to the results from the static structural analysis but they are really negligible.
Do you also notice this kind of behaviour ?

... The loaded strain data is indeed not producing the same stresses from the first analysis. Moreover, my deformed structure even moves where it has fixed support and fixed rotation. It comes to folded mesh during the FSI simulation quite soon. I could not figure out, why the structural side does not respect the boundary conditions

In order to see the stresses, generated by interpolated strains, I produced a backup file at the beginning of the FSI simulation by hand. Hereby, I wanted to compare the von mises stresses with the orginal analysis. But theses stresses are by far not the same. Is there a way to produce a file of the stresses right at the beginning after prestressing? The stresses should be the same as in the first analysis although the FSI is not converged, right?

Quote:

Originally Posted by Jernej Pirnar (Post 358548)
Furthermore, I have also found out that if the UPCOORD is skipped the procedure works well, so I think you could try to proceed without it.

Do you mean the upcoord,-1,on command after solve in your first steady state simulation? I guess, it had no effect in my setup, either... Does that mean, that Stumpy was not right about reseting deformations at the beginning of the FSI?

Thx for every comment!! I am glad that we can discuss this problem here!

Jernej Pirnar May 1, 2012 19:46

I think the stress field should be the same when the structural side converges, even if this is not the case for the coupling.
If you want to save the stress state in a file (.txt), you could probably use the *VWRITE command in the /POST1.
An example how this command is used is shown in the ANSYS Mechanical APDL Basic Analysis Guide in the subchapter 4.7.7. You can also search the ANSYS Customer Portal for the solution #301263.

I have observed in my case the initial state data is correctly applied if I set the number of coupling iterations to 1 (MFITER,1,1,1) in the first steady-state “initialisation” analysis.
If I allow more coupling iterations to be done some unexpected structure deformations appear.

Concerning UPCOORD command I had used in the steady-state analysis; I think there is no need to include it, because when the initial state is applied no deformations appear (neglecting those as the result of the interpolation).

MainzerKaiser May 2, 2012 11:44

I try to follow your way in doing a FSI first, that initializes the stress field in the deformed structure. I have some questions about it:
Quote:

inistate,read,file,ist,/.../.../ !Initial strain data are read (.ist file is obtained in the previous static structural analysis)
cmsel,s,z1
cmsel,a,z2
d,all,all !Both end of the tube are fixed and not able to move in any direction
Do you have these BCs in the first Static Structural and in your transient FSI, too? Or do you use these fixed BC on the ends of the tube, so that the loaded strains dont change the deformed shape of your tube?

I have the problem, that the loaded strains cause a "relaxation" of my structure to the original shape. But unfortunately, the structure has a different position, since my fixed BC is not respected.

In my understanding, there should be a "relaxation" in your first FSI too, since you do not apply Fluid forces to the tube walls... Especially not, when you solve so many substeps at the beginning!

Or am I totally wrong about the procedure?

singer1812 May 2, 2012 12:41

I have been following this thread loosely for a couple of days.

I take it that you are running an initial SS stress state first in Ansys and then moving that into the FSI operation for the coupling.

In order to do this you need to make 2 Ansys models for the FSI couple. Ansys/CFX sets up the FSI boundary on the undeformed shape. So if you run a SS Ansys run, get stresses and deformations and then apply the FSI, you will be applying the BCs on the undeformed ANSYS structural shape.

In order to do what you are suggesting, you need to run your ANSYS SS case, using inistate to save the strain field. Once that is completed, you need to generate a new Ansys geometry by loading in the results from the initial SS run, and use upcoord,1 to change the nodal locations to the deformed shape. If you solve this, you will get a solution with the "baseline" shape of the solid in the correct position for CFX FSI boundary, and the stress field associated with that shape. It should be noted, that removing the fixed displacements will cause the structure to spring back to the original position (as it should, in unstressed state).

To get this into an FSI analysis (I assume your flow field/deformed structure analysis are not so incompatable as to cause numerical instability), you can run the fixed displacement with the initstate field descirbed above, with the CFX flow field included with the correct FSI interface. Run the ansys model as a transient with timint,off (so it is a stready state run) to a set time point, at which time you can remove the fixed displacements, set the timint,on (to turn on transient effects in ANSYS), and let her rip.

I over simplified quite a bit, but this should get you closer to solution.

I

MainzerKaiser May 2, 2012 13:11

To be honest, I couldnt follow all your steps.

Does your way allow for one fluid mesh? I need to generate a mesh for the deformed fluid domain in ICEM in order to simulate the FSI simulation. This is the only reason, why I try to realize the predeforming strategy.

When I read, I need to start my FSI with the undeformed structure, I cannot imagine how the FSI works if the Interfaces not matching...

singer1812 May 2, 2012 14:11

Your ICEM fluid mesh should be of the fluid around the prestressed ANSYS structure (i.e. the already deformed geometry). And the Ansys structure "deformed" from your point of view should be its undeformed state, which is what you use upcoord for, (so that if you apply the strains to this undeformed model it will deform back into your initial undeformed position under no load).

Is this how you are building it?

In this way, at the start of the analysis, prior to any loading or boundary conditions applied, both geometry boundries match, and they are in the deformed position.

MainzerKaiser May 2, 2012 14:18

From the first SS, I write a cdb file with the deformed mesh that is loaded in the SS part from the FSI. In parallel, the ICEM fluid mesh is loaded seperately in the CFX part, which is also influenced by the cdb file.
Then, I hoped to load the stains as pure data to the elements of the predeformed structure within the FSI setting.

If I deform my structure on the basis of strain data, does the structure really deform in the same shape as before.
I only deal with shell structure. Hence, I only deform 2D area structures, which get their thickness over the solid equations. I doubt that the interfaces match at the beginning of the FSI, but Ill try tomorrow!!!

Thx for every comment!!!!

singer1812 May 2, 2012 14:24

Why would your interfaces be different? The structure is deformed and the fluid mesh is generated from the deformed shape.

Make sure when you run the intial transient with timint,off that you fix all structure displacements to zero. This will keep your structutre fixed in the deformed state when you apply the strain field. Solve that to setup the stresses, then release the displacements, turn on time integration (timint,on) and solve your FSI.

Jernej Pirnar May 3, 2012 17:41

Hi,

Quote:

Originally Posted by MainzerKaiser (Post 358886)
Do you have these BCs in the first Static Structural and in your transient FSI, too? Or do you use these fixed BC on the ends of the tube, so that the loaded strains dont change the deformed shape of your tube?


In the static structural analysis the non-zero displacements at the tube ends are prescribed to stretch the originally cylindrical-shaped geometry. In the FSI analysis the displacements at the ends are set to zero to maintain the ends in the fixed position.


Today I tried to follow the procedure singer1812 described in the previous posts.
In the first steady-state FSI run I imported deformed FE model (.cdb file, obtained in the static structural analysis) of the tube and fixed all displacements (NSEL,ALL; D,ALL,ALL) as suggested.
Also the initial strain data was read and transient integration effect was turned off. Results showed the stress field is the same as in the static structural analysis, what is correct.

Next, the FSI run was restarted as transient (transient effect was turned on), previous constraints were deleted and the new were applied only at the tube ends (tube is fixed at its ends, zero displacement).
Results of the transient showed slight changes in the stress field, when the displacements were released and new constraints were applied.
Small dislocations appeared at the unconstrained nodes (into the range of 1e-7 m). Would this be correct?

Thank you in advance for any comment.

Regards,

Jernej

MainzerKaiser May 7, 2012 05:04

Before I could test all your last suggestion, my whole workbench project broke down.
When I try to open an item in the workbench, I suddenly geht the error:
Unable to open file / [..] /dp0/global/MECH/SYS-3.mechdb .Unable set unit system for geometry.

Units are often problematic. When I start a new project setup, I have a problem, I got rid of weeks ago. I keep the units consistent in all workbench items, but during the upcoord procedure from the first SS to the FE Modeler my structure is all of the sudden 1000 times smaller.


I assembled a tiny test-setup in the following project, I sent to the support.
http://depositfiles.com/files/1sjreyjdd
Unfortunately, they dont have a solution for my problem, yet...


The frustrating aspect is that I already had a consisting, working setup.

Btw, in the official ANSYS customer support pdf "MECH_DeformedGeoemtries_DOC.pdf", the same problem occurs! But the tutorial stops, where the drop in size by the factor fo 1000 matters to the subsequent modal analysis.


I could sail around that size problem, by manually increasing the size with ICEM and loading it in a separate FE Modeler for the subsequent FSI. But the file.ist is not loaded correctly in such setup, since the elements in the structure can not be associated with the data in the file anymore. That might be related to the manual ICEM step.




Best regards,
MK


All times are GMT -4. The time now is 22:31.