CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   time-averaged specific variables as sources (https://www.cfd-online.com/Forums/cfx/188711-time-averaged-specific-variables-sources.html)

cardioCFD June 5, 2017 11:28

time-averaged specific variables as sources
 
Hi,

I am trying to simulate a chemical reaction with a kinetic rate depending on the "time averaged shear rate" at each point. The simulation is transient and periodic.

As an initialisation, I ran the simulation (only flow) for one period calculating transient statistics (Trnavg) for shear rate.

In the main simulation, I used the previous flow-only simulation as initial values and tried to access ShearRate.Trnavg in a source (subdomain) that defines the reaction, but I get the GETSOU error in the solver.

Note: ShearRate is an algebraic equation variable with values equal to Shear Strain Rate at each point.

Note: I can use ShearRate.Trnavg on the boundaries, the only problem is that I cannot call ShearRate.Trnavg in the source.

Any comment is highly appreciated. Thanks.

Opaque June 5, 2017 14:45

Would you mind posting the error message you got ?

I understand you setup the case as:

Domain level AV definition:
MyAVTrnavg = Shear Strain Rate.Trnavg

Subdomain level source definition

Source = Function (MyAVTrnavg)

correct ?

cardioCFD June 6, 2017 03:06

Hi,

Thank you for your message. Here is the error:

================================================== ====================
TIME STEP = 101 SIMULATION TIME = 8.8741E-01 CPU SECONDS = 1.134E+05
(THIS RUN: 1 4.4150E-03 3.463E+02)
----------------------------------------------------------------------
COEFFICIENT LOOP ITERATION = 1 CPU SECONDS = 3.463E+02
----------------------------------------------------------------------
| Equation | Rate | RMS Res | Max Res | Linear Solution |
+----------------------+------+---------+---------+------------------+
| U-Mom | 2.97 | 2.3E-04 | 1.9E-02 | 4.4E-02 OK|
| V-Mom | 1.96 | 1.4E-04 | 1.1E-02 | 8.2E-02 OK|
| W-Mom | 1.29 | 8.8E-05 | 5.8E-03 | 1.2E-01 ok|
| P-Mass | 3.63 | 1.2E-04 | 1.7E-02 | 9.9 9.6E-02 OK|
+----------------------+------+---------+---------+------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| Failed to calculate sources in GETSOU for RESSRC_A from director- |
| y "" on location "sources". Error return code is: OPER |
| |
| |
| |
| |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| Stopped in routine GETSOU |
| |
| |
| |
| |
| |
+--------------------------------------------------------------------+

For now, I created another volumetric/algebraic equation variable called TASR in both initialisation and the main simulations, this variable is nothing but ShearRate.Trnavg. Now I can access this new variable in defining sources and it seems to work for now. I would appreciate any further comment on that.

Thanks a lot.

Opaque June 6, 2017 09:22

Unfortunately, that is the workaround approach.

From the message, the function GETSOU says it has an error handling the OPER attribute.

Shear Strain Rate.Trnavg is a combination of Variable.Operator, so it can be assumed it could not process the ".Trnavg" part.

By copying into an algebraic variable, you have bypassed the handling of the ".Trnavg"..

You should be good to go.

SaschaGH July 30, 2018 07:55

Thanks Opaque for the explanation, just helped me a lot!
Best


All times are GMT -4. The time now is 12:31.