CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Expression with time function (https://www.cfd-online.com/Forums/cfx/90369-expression-time-function.html)

kestasposkus July 7, 2011 17:54

Expression with time function
 
Hello,
I want to add time function in to expression like this:
maxVal(Pressure)@.outer with different time

I have read CFX help but no were can found any info:confused:

BRGDS Vytas

ghorrocks July 7, 2011 19:04

CEL cannot access time the history of variables.

Daniel Leite Oliveira July 8, 2011 12:42

Your question it's not to informative. Could you provide more details on that?

kestasposkus July 8, 2011 16:34

Hello again!

my problem is 2 stroke engine muffler and here is very important shock waves it means that then I make optimization I solve 2 the same problems: one with time T (all discharge time) and over solution with T/5 (only 1/5 discharge time)
For that times I set my optimization targets
All this was fine, we produce muffler for to day it is one of the best in that class.
But now then I made model with two way model (CFX+ Transient structural) this problem would take too long time.
so my question is it possible in results window set equation with time/time step function?
I have been tried set function like this :maxVal(Pressure)@.outer*time*0.2 but I think this is not right too.
I hope that now my problem is much more clear...:confused:

ghorrocks July 10, 2011 06:41

Why do you want to do a transient structural model?

I do not understand what you are asking, but isn't the averaged mass flow rate of the engine very close to the swept volume * speed? You will have some difference due to scavenging but this is close enough to start with I guess.

kestasposkus July 10, 2011 15:48

hell again,

Yes I did transient simulation and in results window I can changes of flow parameters like pressure velocity.
But for optimization I need equation with time function it means for example:

maxVal(Pressure)@outer at time 0,1s

maxVal(Pressure)@outer at time 0,005s

How set time equation with time history?

:confused:

ghorrocks July 10, 2011 19:06

No, my first question is why are you doing CFX + Transient structural models. I cannot see where FSI is required from what you have described.

You will have to look into workbench parameters to see if it can do what you ask. CEL certainly cannot as CEL does not store the time history of variables.

kestasposkus July 11, 2011 14:44

hello,
I use Transient structural+ CFX due to that muffler wall is quite fin and pressure chances give some pressure vibration to wall, and this changing flow physics, all so wall thinness important to temperature changes between outer environment and inner hot gases.

More realistic parameters in the input gives more realistic in the out put:D

then I solve only CFX it take only 15min. then I sove Transient+CFX it takes 5...6 hours. I have in the input 10 dimension parameters so it means about 100 different DOE experiments so it means about 25days for that problem. Its to long and too big memory computer capacity requited.
So due to that I want to reduce solution model...
How over people receiving time history from CFX?

ghorrocks July 11, 2011 19:07

I see. As has been said previously you cannot access time history through CEL. You can either write your own fortran routine to do it if you need it in the simulation, or you can use a monitor point to export the data and access it in post-processing if that is suitable.

kestasposkus July 12, 2011 02:57

hello,

Do You have any idea how with fortran set time function?
When You wrote about monitor point You mean CFX Prep settings monitor user parameters which during solution I can monitor? But in that way I can not set equation for my optimization target:mad:

Best regards

ghorrocks July 12, 2011 18:50

If you need to use the value inside the simulation then it has to be fortran.

kestasposkus July 15, 2011 06:59

hello,

I have read Yours replay but still do not understood
how set any variable in any time

lets say pressure
or speed

I have been try different approaches more the one year,
but still get now right way

so

how is set
pressure if
all time is 1s
but I wanted some parameters at time 0,5s?

Best regards Vytautas

ghorrocks July 16, 2011 06:51

You will have to set up a fortran function which stores the values as the simulation progresses and returns it later in the simulation when required.

I have done many simulations of exhaust systems over the years and have never had the need for a function like what you describe. I used a mass flow rate boundary at the exhaust valve and a pressure boundary a little way out from the pipe end. No need for history functions.

kestasposkus July 17, 2011 09:06

hello, ghorrocks

You say that You have made simulation of the exhaust system,

But is it was 2 stroke engine or 4 stroke engine?
for 4 stroke engine I have seen some jobs then it was used steady state
but for 2stroke engine it is no good back pressure waves create about 30..40 percent more engine power

and AS I see that it is very difficult set time step or time in the equation...:confused:

Any way sorry for my English

Brgds Vytautas

ghorrocks July 17, 2011 19:41

I have modelled both 4 stroke and 2 stroke engines.

Modelling the exhaust with steady flow is of limited use. Whether it is 2 or 4 stroke you will get much more information out of a transient model. You define a mass flow rate versus time/crank angle curve and apply that as a mass flow boundary at one end of the pipe.

For engines where the cylinder is closely coupled with the exhaust (eg 2 stroke engines or 4 stroke engines with wide overlap) then consider including the cylinder in the calculation.

kestasposkus July 18, 2011 04:42

1 Attachment(s)
hello,

On my picture is pressure wave in the muffler during exhaustion process.
the problem is equation sum few time moments during gas flowing

I want equation like that:

Pressure 1+ Pressure 2 +Pressure 3... =?

How?

Moving piston + cylinder + muffler - very good Idea!

BRGDS

Vytautas

ghorrocks July 18, 2011 06:43

I did not understand your last post and the image is not readable.

But I explained how this sort of modelling is normally done - determine the mass flow rate versus crank angle. You might be able to guess this from the swept volume and valve motion/discharge coefficients but you will probably need a 1D exhaust modelling simulation to get this. Alternately you might be able to put a pressure transducer in the exhaust pipe and get a pressure versus time chart and use this - not as good in my experience but easier to get the boundary information.

kestasposkus July 19, 2011 13:11

1 Attachment(s)
hello,

I tried to make mesh movement the task but I'm not sure about the interface setup and constantly throws me the error:

A negative SECTOR volume has been detected. Execution will proceed |
| but this is a possible cause of robustness problems.

I started form single solid movement then it was good I put two solids but I am not clear how to manage with interface set ups

picture added..

Pls help me

Vytautas

stumpy July 19, 2011 15:14

The region you highlighted should be a domain interface. After creating the interface you'll have "... Side 1" and a "... Side 2" boundary conditions. Edit these boundary conditions and change the mesh motion setting to something appropriate (stationary, specified displacement, etc).
Note that if you have a stationary boundary next to a moving boundary then you can expect problems where the two meet. Your mesh motion boundary conditions need to be consistent where two boundaries meet.

kestasposkus July 19, 2011 16:32

thank You for replay!


All times are GMT -4. The time now is 03:49.