CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   Repeated table input (http://www.cfd-online.com/Forums/star-ccm/92925-repeated-table-input.html)

hamzamotiwala September 29, 2011 07:35

Repeated table input
 
Hello everyone,

I am simulating an Exhaust gas recirculation model and I give in my input in the form of a table. The table is divided into 720 time steps corresponding to each crank angle turned.

I want to repeat this cycle a couple of times. How can I get starccm+ to repeat the cycle everytime it reaches the end of the table.

As a work around I had copy pasted the data one after the other 5 times in the same excel sheet along with increasing the time respectively to run the cycle 5 times .

Is there a way to do it automatically?

thanks,
Hamza

abdul099 October 1, 2011 18:08

It is possible, but I have to check how to do it.

hamzamotiwala October 3, 2011 05:12

Thanks! I really appreciate it.

abdul099 October 5, 2011 19:08

Okay, the solution for your problem is:

- Read in the table for one cycle as usual. More than one cycle doesn't harm, but is not necessary.
- Create a field function which uses the mod or fmod function (see field function programming reference in the online help) to give back a cyclic time. For example fmod($Time, 0.1) will take the current time and subtract 0.1 seconds until the remainder is less than 0.1. Let' call this $modTime
- Create an interpolation field function. Interpolate the table (or the right column) by $modTime.
- Use the later field function as input for your boundary condition

Hope this helps

hamzamotiwala October 6, 2011 02:23

Hey abdul,

Thanks for the reply.

certain things are unclear to me.

my time-step is .000060611 secs
total physical time is .2181996

these are the field functions i wrote :

modTime = fmod($Time, .000060611)

interpolateTable(@Table("hd_egr"), "Time", SPLINE, "massflow", $modTime)

now if my first time step would be .000060611 secs. I get a remainder 0 and then does the second field function above interpolate for a massflow value for time 0 in the table.

If the remainder remains 0 all the time, how does it move further? I am lost here completely. I think I have not understood this thing correctly.

How do I repeat the table n number of times?

Can you explain further please?

Thanks,
Hamza

abdul099 October 6, 2011 18:33

Quote:

Originally Posted by hamzamotiwala (Post 326858)
my time-step is .000060611 secs
total physical time is .2181996

these are the field functions i wrote :
modTime = fmod($Time, .000060611)
interpolateTable(@Table("hd_egr"), "Time", SPLINE, "massflow", $modTime)

You nearly got it. I think, your total physical time should be the cycle time, shouldn't it? So your first field function should be

modTime = fmod($Time, .2181996)

So every time step your time will progress for 0.00006.... seconds until it finishes the first cycle. Then the cycle time will be cut and your simulation keeps on going, repeating the table from time the beginning.

There is no number which defines how often the table should be repeated. The table will be repeated until your stopping criterias are satisfied and the simulation stops. So make sure your stopping criterias are set appropriate.

hamzamotiwala October 7, 2011 17:18

Thanks a lot abdul!

I have made the necessary corrections and started the simulation. Hope to get some positive results on monday :).

hamzamotiwala October 12, 2011 02:51

It worked perfectly. Thanks a lot for the help man!

abdul099 October 13, 2011 17:00

You're welcome

rabat December 7, 2011 05:21

exhaut converge
 
Hi Hamza,

how do setup the physics conditions by Your calculation.
My residuals is not really converge, I got Floiting Point exception after 3 cycles.

Thanks,

Rabat

hamzamotiwala December 7, 2011 09:51

Quote:

Originally Posted by rabat (Post 334970)

how do setup the physics conditions by Your calculation.
My residuals is not really converge, I got Floiting Point exception after 3 cycles.

Hey Rabat,

I didnot understand your question. Do you want to know what physics models I used?

I have run my simulations for as long as 14 cycles till now and I have had no problems. My first 2 or sometimes 3 cycles appear to be a little different from one another but later everything is fine.

elaborate a little more and I will try providing more data from my side.

Best Regards,
Hamza

rabat December 8, 2011 07:52

Hey Hamza,

which turbulant model did You use?
I use at the moment: coupled energy, coupled flow, k-epsilon turbulent and implicit unsteady.
Did You change the solver parameters?
Coupled implicit: courant number ramp or AMG linear solver

How many inner iteration do you use?

I would appreciate if You answer my quetions.

Best Regards,
Rabat

hamzamotiwala December 9, 2011 05:35

Quote:

Originally Posted by rabat (Post 335126)
which turbulant model did You use?
I use at the moment: coupled energy, coupled flow, k-epsilon turbulent and implicit unsteady.
Did You change the solver parameters?
Coupled implicit: courant number ramp or AMG linear solver

How many inner iteration do you use?

I have used K Omega and K epsilon for my simulations.
I have used both coupled and segregated models.

currently I am simulating with Segregated and K Omega models.

In my current simulation I have 40 inner iterations and I am running the simulation for 8 cycles that sums up to a total of around 230000 iterations.

I did play with the courant number but since I am using segregated flow right now, its not relevant here. Apart from that I am using default values.

No matter what the model, I think you should not have any problems running this code. You should be able to run it for as many cycles as possible.

You should try running your simulation with default settings.

What I dont understand is, if you can run the cycle once you should be able to run it a 100 times.


All times are GMT -4. The time now is 00:57.