CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Start simulation at t =/= 0 for oscillation motion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2021, 05:59
Default Start simulation at t =/= 0 for oscillation motion
  #1
New Member
 
Join Date: Jun 2021
Posts: 6
Rep Power: 4
worldsheep is on a distinguished road
Hello everyone,

I am running a simulation using pimpleFoam with a rotating oscillating mesh. I just found out that the rotating function is hardcoded in "oscillatingRotatingMotion.C" and is:

Code:
vector eulerAngles = ampltude_*sin(omega_*t)
Which means that the angular velocity goes as a cos function. This implies that my rotating element starts at full speed which is noti ideal for my application.

Conclusion: I would like to find a solution to start the simulation at rest and increase speed gently. Ideally I wiuld like a cos instead of a sin fot the angular position.

I found the following post:

AMI speed performance

But modifying the source code is not really an option for me.

My final question is... Is it possible to start a simulation at a time different than t = 0s? By properly choosing the initial time I could transform the sin function into a cos (phase shift).
worldsheep is offline   Reply With Quote

Old   October 20, 2021, 06:38
Default
  #2
Senior Member
 
Join Date: Jan 2014
Posts: 179
Rep Power: 12
hxaxtma is on a distinguished road
Hi,

1st option: Hard coded: it is possible but you need to adapt the solver. (e.g.: as an example define scalar t_offset -> (sin(t+t_offset))) and so on...

2nd option: Run "moveDynamicMesh" and stop at your wanted endTime of your initial stage. Next, run pimplefoam

Have fun
hxaxtma is offline   Reply With Quote

Old   October 20, 2021, 10:27
Default
  #3
New Member
 
Join Date: Jun 2021
Posts: 6
Rep Power: 4
worldsheep is on a distinguished road
Thank you for your reply, I tried a third option which is a direct consequence of number (2):

3) Create a geometry with the rotor at the position which satisfies angular velocity equal to 0. Then change the name of the 0 folder into the time at which you want the rotor to have zero angular velocity (position is going to be -cos). Finally, change the controlDict and set:
Code:
startFrom       latestTime;
This has the advantage of keeping the position at wich angular velocity equals zero unchanged and have the amplitude as a parameter without needing to modify the geometry each time.

For the moment my simulation explodes,... Still trying to understand why
worldsheep is offline   Reply With Quote

Reply

Tags
openfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mpirun during simulation under Docker (start with ./startOpenFOAM) spalartallmaras OpenFOAM Running, Solving & CFD 1 November 3, 2021 04:13
Cooling Brake Simulation: A Motion Problem Between Two Solid Interfaces SimulatorMaster Main CFD Forum 0 May 10, 2020 12:03
Start the simulation during a valve event MMatt CONVERGE 4 December 11, 2019 02:12
Start new Ansys Fluent Simulation automatically Malue Fluent UDF and Scheme Programming 1 October 4, 2017 01:48
Simulation with motion liuzexiang CFX 28 November 29, 2012 03:15


All times are GMT -4. The time now is 20:33.