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

CEL on Timesteps (repetitive)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2023, 04:47
Default CEL on Timesteps (repetitive)
  #1
Member
 
Join Date: Jun 2011
Posts: 38
Rep Power: 14
mariconeagles96 is on a distinguished road
HI Sirs/madam,

I wanted to use an expression to make a repetitive use of my timestep.

Total time = 150 [min]

Then for every 50min I have this set of timesteps:

Timestep = 10*2, 15*1.5, 15*0.5 <----- this is 50min. I want to repeat this time step 3 times so that I could reach the total time of 150min.

The output of these is like... 2 [min], 2 [min], ... up to 10x, 1.5 [min], 1.5 [min], ... up to 15x and 0.5 [min], 0.5 [min], ... up to 15x and so forth.

Thanks for the help! =)
mariconeagles96 is offline   Reply With Quote

Old   June 13, 2023, 07:07
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,728
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
1) Use a 1D interpolation function, with time step size versus time. It will have three repeats but that is manageable.

2) Use a mod() function to convert time to a periodic signal going from 0 to 50s, so something like: CycleTime = mod(time,50[s]). Then use CycleTime as the x variable for the 1D interpolation function (or if() statements or whatever you are using).

Also: Sudden large changes in time steps are generally best avoided as they massively reduce the accuracy of your time discretisation. You can also have problems with convergence. Most of the time you are better off to just use the finest time step for the entire thing so you can keep a constant time step size. You should try a constant time step of 0.5[s], I bet it is not much slower than your variable time step size and it will be a lot more accurate.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   June 13, 2023, 17:09
Default
  #3
Senior Member
 
Join Date: Jun 2009
Posts: 1,815
Rep Power: 32
Opaque will become famous soon enough
I agree with Glenn. Unless you know the timesteps you are using will produce a timestep-independent solution, it seems to be looking for problems that are not there.

For the quickest solution, I will just copy the 2 additional steps. That is

Timestep = 10*2, 15*1.5, 15*0.5, 10*2, 15*1.5, 15*0.5, 10*2, 15*1.5, 15*0.5

Done!!
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   June 13, 2023, 21:48
Default
  #4
Member
 
Join Date: Jun 2011
Posts: 38
Rep Power: 14
mariconeagles96 is on a distinguished road
Quote:
Originally Posted by Opaque View Post
I agree with Glenn. Unless you know the timesteps you are using will produce a timestep-independent solution, it seems to be looking for problems that are not there.

For the quickest solution, I will just copy the 2 additional steps. That is

Timestep = 10*2, 15*1.5, 15*0.5, 10*2, 15*1.5, 15*0.5, 10*2, 15*1.5, 15*0.5

Done!!
Thanks OPAQUE! =) Actually my problem is quite complicated for me and I just wanted to make my inquiry simple.

Just to share, my problem is that with a given timestep (for example 10*2 [min]) there is a certain heat load applied to this and so on. But then at the 3rd set of timestep (for example 15*0.5 [min]) there will be a 200% heat load spike and goes back to the 1st load step until the 2nd to reach 50min. So basically its 5 set of timesteps for say 50 min. The actual total test time is about 24 hours. So in a span of 24 hours (1440 min), the number of cycle is about 1440/50min = 28.8 or 29 cycles. 1 cycle is about 5 sets of timesteps with 1 load spike at the middle (3rd timestep).

Example:
load1 = 0.5W ; t1=2min * 10
load2 = 1.0W ; t2=1.5min * 14
load3 = 3.0W ; t3=1.5min * 1 <--- load spike
load4 = 0.5W ; t4=0.5min * 3
load5 = 1.0W ; t5=0.5min * 2

load 1 to 5 is 50min and wanted to do this for 12 or 24 hours.

My objective is to check how long does this mosFET survive with the current test condition.

Thanks again for the help!
mariconeagles96 is offline   Reply With Quote

Old   June 13, 2023, 21:52
Default
  #5
Member
 
Join Date: Jun 2011
Posts: 38
Rep Power: 14
mariconeagles96 is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
1) Use a 1D interpolation function, with time step size versus time. It will have three repeats but that is manageable.

2) Use a mod() function to convert time to a periodic signal going from 0 to 50s, so something like: CycleTime = mod(time,50[s]). Then use CycleTime as the x variable for the 1D interpolation function (or if() statements or whatever you are using).

Also: Sudden large changes in time steps are generally best avoided as they massively reduce the accuracy of your time discretisation. You can also have problems with convergence. Most of the time you are better off to just use the finest time step for the entire thing so you can keep a constant time step size. You should try a constant time step of 0.5[s], I bet it is not much slower than your variable time step size and it will be a lot more accurate.
Thanks ghorrocks! I'll try my best to learn and apply this method on my current problem. As what I've mentioned to OPAQUE, I will be doing the cycles for 24 hours to check the condition of my mosFET. Anyway, hope you can help too or further give me insights on how to deal with my current simulation setup. =)
mariconeagles96 is offline   Reply With Quote

Old   June 14, 2023, 09:58
Default
  #6
Senior Member
 
Join Date: Jun 2009
Posts: 1,815
Rep Power: 32
Opaque will become famous soon enough
Quote:
Originally Posted by mariconeagles96 View Post
Thanks OPAQUE! =) Actually my problem is quite complicated for me and I just wanted to make my inquiry simple.

Just to share, my problem is that with a given timestep (for example 10*2 [min]) there is a certain heat load applied to this and so on. But then at the 3rd set of timestep (for example 15*0.5 [min]) there will be a 200% heat load spike and goes back to the 1st load step until the 2nd to reach 50min. So basically its 5 set of timesteps for say 50 min. The actual total test time is about 24 hours. So in a span of 24 hours (1440 min), the number of cycle is about 1440/50min = 28.8 or 29 cycles. 1 cycle is about 5 sets of timesteps with 1 load spike at the middle (3rd timestep).

Example:
load1 = 0.5W ; t1=2min * 10
load2 = 1.0W ; t2=1.5min * 14
load3 = 3.0W ; t3=1.5min * 1 <--- load spike
load4 = 0.5W ; t4=0.5min * 3
load5 = 1.0W ; t5=0.5min * 2

load 1 to 5 is 50min and wanted to do this for 12 or 24 hours.

My objective is to check how long does this mosFET survive with the current test condition.

Thanks again for the help!
I think, then, Glenn's suggestion is the one to follow.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Reply


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
Mesh displacement failed with User CEL Functions motorbean CFX 2 July 11, 2022 05:33
How to load only few timesteps from all timesteps that have been loaded in CFD-Post? vuongcongdat FLUENT 2 August 1, 2019 23:46
Problem with maximum number of Timesteps Phantalor CFX 5 July 13, 2013 07:15
CEL vs. USER FORTRAN Zaktatir CFX 0 February 16, 2013 06:29
Turbomachinery - change rotation every 30 timesteps (CEL) lindner CFX 4 September 6, 2011 18:56


All times are GMT -4. The time now is 08:51.