The Designer's Guide Community
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 11th, 2020, 5:08pm
Pages: 1
Send Topic Print
Accessing simulation parameter in OCEAN (Read 250 times)
Horror Vacui
Senior Member

Posts: 107
Dresden, Germany
Accessing simulation parameter in OCEAN
Oct 17th, 2019, 2:38am
Hi Everyone,

The general question: Is there a way to access simulation parameters in an OCEAN script?

Current use case: I am running an AC analysis with design variable sweep at a fixed frequency. In the post processing I use the frequency value, what now I have write into the code. Magic number in the ocean code! Sad It could lead to trouble if the frequency changes. The elegant solution would be to get the frequency used in the simulation automatically. Is something like that possible? What is the keyword I should look for in the documentation?
Back to top
View Profile   IP Logged
Andrew Beckett
Senior Fellow

Life, don't talk to
me about Life...

Posts: 1734
Bracknell, UK
Re: Accessing simulation parameter in OCEAN
Reply #1 - Feb 22nd, 2020, 3:59am
Whilst you can retrieve useful information about the analysis using the resultParam function - for example:

resultParam("start" ?result 'ac)
resultParam("stop" ?result 'ac)

if you've swept a parameter (a design variable) and chosen a single fixed frequency for the analysis, that is not one of the outputs that is kept in the PSF database. The closest is the resultParam("analysis description" ?result 'ac) but that's a text string with the info embedded - it would be a bit messy to have to parse that to pull out the frequency.

A better approach is probably to do something like this:

analysis('ac ?freq singleFreq ?param "temp" ?start "-40" ?stop "125")

Then you have your variable in the same OCEAN script that  you can use for results processing.

That said, I think it would be a reasonable enhancement that spectre also saves the single frequency in the results header so that this was accessible. I would suggest contacting and asking for this enhancement.


Back to top
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2020 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to Consider submitting a paper or model.