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!

kestasposkus July 21, 2011 16:51

1 Attachment(s)
hello,

I made two domain interface analysis one of them is moving other static.

but then I check results I found that fluid do not flow from one interface side to other...

Interface model: General

Interface connection: GGI

Additional Interface model: Side Dependent

best regards Vytautas

ghorrocks July 21, 2011 19:29

I have done this type of interface many times, it should work fine. There is something specific to your setup which is not working. Need more details to be of further assistance.

kestasposkus July 22, 2011 11:28

hello

some info:

FLOW: Flow Analysis 1
&replace DOMAIN INTERFACE: Domain Interface 1
Boundary List1 = Domain Interface 1 Side 1
Boundary List2 = Domain Interface 1 Side 2
Filter Domain List1 = Default Domain
Filter Domain List2 = cilindrine dalis
Interface Region List1 = static side
Interface Region List2 = moving side
Interface Type = Fluid Fluid
INTERFACE MODELS:
Option = General Connection
FRAME CHANGE:
Option = None
END
MASS AND MOMENTUM:
Option = Free Slip Wall
END
PITCH CHANGE:
Option = None
END
END
MESH CONNECTION:
Option = GGI
INTERSECTION CONTROL:
Face Intersection Depth Factor = 1
Face Search Tolerance Factor = 0.1
Option = Bitmap
Permit No Intersection = On
END
END
END

First side:

FLOW: Flow Analysis 1
DOMAIN: Default Domain
&replace BOUNDARY: Domain Interface 1 Side 1
Boundary Type = INTERFACE
Interface Boundary = On
Location = static side
BOUNDARY CONDITIONS:
HEAT TRANSFER:
Option = Conservative Interface Flux
END
MESH MOTION:
Option = Specified Displacement
DISPLACEMENT:
Displacement X Component = 0 [m]
Displacement Y Component = su funcijos duomenimis
Displacement Z Component = 0 [m]
Option = Cartesian Components
END
END
THERMAL RADIATION:
Option = Conservative Interface Flux
END
END
NONOVERLAP CONDITIONS:
Boundary Type = WALL
BOUNDARY CONDITIONS:
HEAT TRANSFER:
Heat Transfer Coefficient = 20 [W m^-2 K^-1]
Option = Heat Transfer Coefficient
Outside Temperature = 100 [C]
END
MASS AND MOMENTUM:
Option = No Slip Wall
Wall Velocity Relative To = Mesh Motion
END
MESH MOTION:
Option = Specified Displacement
DISPLACEMENT:
Displacement X Component = 0 [m]
Displacement Y Component = su funcijos duomenimis
Displacement Z Component = 0 [m]
Option = Cartesian Components
END
END
THERMAL RADIATION:
Diffuse Fraction = 1.
Emissivity = 1.
Option = Opaque
END
WALL ROUGHNESS:
Option = Smooth Wall
END
END
END
END

Second side:


FLOW: Flow Analysis 1
DOMAIN: cilindrine dalis
&replace BOUNDARY: Domain Interface 1 Side 2
Boundary Type = INTERFACE
Interface Boundary = On
Location = kur juda
BOUNDARY CONDITIONS:
HEAT TRANSFER:
Option = Conservative Interface Flux
END
MESH MOTION:
Option = Specified Displacement
DISPLACEMENT:
Displacement X Component = 0 [m]
Displacement Y Component = su funcijos duomenimis
Displacement Z Component = 0 [m]
Option = Cartesian Components
END
END
THERMAL RADIATION:
Option = Conservative Interface Flux
END
END
NONOVERLAP CONDITIONS:
Boundary Type = WALL
BOUNDARY CONDITIONS:
HEAT TRANSFER:
Heat Transfer Coefficient = 10 [W m^-2 K^-1]
Option = Heat Transfer Coefficient
Outside Temperature = 100 [C]
END
MASS AND MOMENTUM:
Option = No Slip Wall
END
MESH MOTION:
Option = Specified Displacement
DISPLACEMENT:
Displacement X Component = 0 [m]
Displacement Y Component = su funcijos duomenimis
Displacement Z Component = 0 [m]
Option = Cartesian Components
END
END
THERMAL RADIATION:
Diffuse Fraction = 1.
Emissivity = 1.
Option = Opaque
END
WALL ROUGHNESS:
Option = Smooth Wall
END
END
END
END
END
END


I have tried different set ups but all time the same


thanks For help

Vytautas

stumpy July 22, 2011 14:47

Check the solver output. The domain interface intersection should be re-calculated each timestep and you should see the non-overlap fraction calculated and shown as non-zero.

kestasposkus July 23, 2011 05:32

hello,

I check solution out put options but I have not see options :inersection recalculate each time step

I use 13 version...

In solver control tab
there are some options Intersection control - but intersection recalculate each time step no...

please hellp :confused:

best regards Vytautas

ghorrocks July 23, 2011 06:27

The interface model needs to be transient rotor stator to get it to recalculate the GGI each time step. You have selected general interface which is for a fixed interface.

kestasposkus July 23, 2011 15:21

hello,

rotor and stator in straight line movement analysis ?

I have read Ansys 12 training manual there are 3 tape of interface models:

Translation periodicity- in my case NO

Rotation periodicity -in my case NO

General connection this is all what remand... frame changes -YES, Pitch change -YES

or I under stud some thing wrong?

waiting for replay

Vytautas

kestasposkus July 23, 2011 15:31

hello

Can some body send require set ups for strait line transient moving...

or any tutorial...

please...

I stuck in on it for too long...

Vytautas

ghorrocks July 24, 2011 06:47

I told you what you need. There should be options like frozen rotor and other rotationing domain types and transient rotor stator.

I seem to vaguely remember you need to set one domain to be rotating to access these options - in this case set the stationary domain to be rotating at 1e-10 rad/s or something like that.


All times are GMT -4. The time now is 06:53.