Consider frequency-dependent ESR, capacitor tolerance and temperature (voltage derating)#2
Merged
Conversation
SevenOfNinePE
suggested changes
Oct 27, 2025
| else: | ||
| print(f"Failed to download file. Status code: {response.status_code}") | ||
| except Exception as e: | ||
| print(f"Error: {e}") |
There was a problem hiding this comment.
More information about code location is useful. Sth. like 'Error at download capacitor data: {e}'
Additionally the information about the capacitor type, which could not download, is missing.
| file.write(response.content) | ||
| print(f"File downloaded successfully: {save_path}") | ||
| else: | ||
| print(f"Failed to download file. Status code: {response.status_code}") |
There was a problem hiding this comment.
The information about the capacitor type, which could not download, is missing.
| derating_factor = get_temperature_current_derating_factor(ambient_temperature=c_requirements.temperature_ambient, df_derating=c_derating) | ||
|
|
||
| # check for temperature derating | ||
| delta_temperature_max = derating_factor ** 2 * 15 |
There was a problem hiding this comment.
Magic number '15'. Minimum explain in comment above, what is the reason for multiply it with 15
|
|
||
| derating_factor = get_temperature_current_derating_factor(ambient_temperature=capacitor_requirements.temperature_ambient, df_derating=c_derating) | ||
| virtual_inner_max_temperature = c_requirements.temperature_ambient + delta_temperature_max | ||
| c_db['V_op_max_virt'] = c_db.apply(lambda x: np.interp(virtual_inner_max_temperature, [85, 105, 125], |
There was a problem hiding this comment.
Please add a short comment, that explain the 'magic numbers' 85, 105 and 125 are the temperatures,
Contributor
Author
|
Fixed the above points. Two additional points:
|
SevenOfNinePE
approved these changes
Oct 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calculation improvements
parallel neededcapacitorsA download script is provided to download all the ESR-over-frequency data from the manufacturer